fish-shell/sphinx_doc_src/cmds/disown.rst
David Adam 02d82dcf85 docs: update all command synopsis formatting
Adds synopses for those commands missing them.

Moves all synopsis sections to code blocks. This improves the appearance, although highlighting as
fish code may not be the ideal appearance.
2019-09-17 17:59:04 +08:00

31 lines
1.3 KiB
ReStructuredText

.. _cmd-disown:
disown - remove a process from the list of jobs
===============================================
Synopsis
--------
::
disown [ PID ... ]
Description
-----------
``disown`` removes the specified `job <index.html#syntax-job-control>`__ 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 PIDs 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.
``disown`` returns 0 if all specified jobs were disowned successfully, and 1 if any problems were encountered.
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.