diff --git a/doc_src/cmds/disown.rst b/doc_src/cmds/disown.rst index 05cf221af..964de0b21 100644 --- a/doc_src/cmds/disown.rst +++ b/doc_src/cmds/disown.rst @@ -14,6 +14,7 @@ Description ----------- ``disown`` removes the specified :ref:`job ` from the list of jobs. The job itself continues to exist, but fish does not keep track of it any longer. +This will make fish lose all knowledge of the job, so functions defined with ``--on-process-exit`` or ``--on-job-exit`` will no longer fire. 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. diff --git a/doc_src/cmds/function.rst b/doc_src/cmds/function.rst index 00f61f566..1239873cf 100644 --- a/doc_src/cmds/function.rst +++ b/doc_src/cmds/function.rst @@ -37,9 +37,11 @@ The following options are available: **-j** *PID* or **--on-job-exit** *PID* Run this function when the job containing a child process with the given process identifier *PID* exits. Instead of a PID, the string 'caller' can be specified. This is only allowed when in a command substitution, and will result in the handler being triggered by the exit of the job which created this command substitution. + This will not trigger for :doc:`disowned ` jobs. **-p** *PID* or **--on-process-exit** *PID* Run this function when the fish child process with process ID PID exits. Instead of a PID, for backward compatibility, "``%self``" can be specified as an alias for ``$fish_pid``, and the function will be run when the current fish instance exits. + This will not trigger for :doc:`disowned ` jobs. **-s** *SIGSPEC* or **--on-signal** *SIGSPEC* Run this function when the signal ``SIGSPEC`` is delivered. ``SIGSPEC`` can be a signal number, or the signal name, such as ``SIGHUP`` (or just ``HUP``). Note that the signal must have been delivered to :program:`fish`; for example, :kbd:`Ctrl-C` sends ``SIGINT`` to the foreground process group, which will not be :program:`fish` if you are running another command at the time. Observing a signal will prevent fish from exiting in response to that signal.