fish-shell/share
Fabian Homborg 168677f8b3 Use disown with $last_pid
As mentioned in 5b706faa73, bare
`disown` has a problem: It disowns the last *existing* job.

Unfortunately, it's easy to see cases where that won't happen:

    sleep 5m &
    /bin/true & # will exit immediately
    disown # will most likely disown *sleep*, not true

So what we do is to pass $last_pid.

In help especially this is likely to occur because many graphical
browsers fork immediately to avoid blocking the terminal (we only
added the backgrounding and disown because some weren't).

Note that it's *possible* this doesn't occur if used in the same
function, but I don't want to rely on those semantics.

It might be worth doing this as the default - see #7210.
2021-01-09 13:44:48 +01:00
..
completions completions/pkg: Add support for "alias" and "bootstrap" sub-commands 2021-01-08 21:36:29 +01:00
functions Use disown with $last_pid 2021-01-09 13:44:48 +01:00
groff
tools use original theme repo URL 2021-01-04 13:54:58 +01:00
__fish_build_paths.fish.in
config.fish Only send the PID of the last process in a job to builtin fg 2020-10-18 19:36:48 +02:00
lynx.lss