mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
27 lines
1.5 KiB
Text
27 lines
1.5 KiB
Text
|
\section disown disown - remove a process from the list of jobs
|
||
|
|
||
|
\subsection disown-synopsis Synopsis
|
||
|
\fish{synopsis}
|
||
|
disown [ PID ... ]
|
||
|
\endfish
|
||
|
|
||
|
\subsection disown-description Description
|
||
|
|
||
|
`disown` removes the specified <a href="index.html#syntax-job-control">job</a> from the list of jobs. The job itself continues to exist, but fish does not keep track of it any longer.
|
||
|
|
||
|
Jobs in the list of jobs are sent a hang-up signal when fish terminates, which usually causes the job to terminate; `disown` allows these processes to continue regardless.
|
||
|
|
||
|
If no process is specified, the most recently-used job is removed (like `bg` and `fg`). If one or more `PID`s are specified, jobs with the specified process IDs are removed from the job list. Invalid jobs are ignored and a warning is printed.
|
||
|
|
||
|
If a job is stopped, it is sent a signal to continue running, and a warning is printed. It is not possible to use the `bg` builtin to continue a job once it has been disowned.
|
||
|
|
||
|
The PID of the desired process is usually found by using <a href="index.html#expand-process">process expansion</a>, which can specify jobs or search by process name.
|
||
|
|
||
|
`disown` returns 0 if all specified jobs were disowned successfully, and 1 if any problems were encountered.
|
||
|
|
||
|
\subsection disown-example Example
|
||
|
|
||
|
`firefox &; disown` will start the Firefox web browser in the background and remove it from the job list, meaning it will not be closed when the fish process is closed.
|
||
|
|
||
|
`disown (jobs -p)` removes all jobs from the job list without terminating them.
|