Skip to content

fish lacks manual disown capability/command, in case we want running, owned jobs to stop upon terminal exit #2810

Closed
@Pysis868

Description

@Pysis868

I wanted to effectively 'disown' jobs/processes like I do in bash, manually.

I have found out that this happens automatically (#773) (Fish User Discussions - "disown" command in fish), but feel there may be some that would like it to be a manual process. As the following steps highlight, some may want jobs to be started with the intent of stopping when the parent terminal session exits.

Also, I have not found this explanation of the functionality in the official documentation (fish shell - Commands - jobs). Could this be added?

Reproduction Steps:

~> jobs
jobs: There are no jobs
~> sleep 12m &
~> jobs
Job Group   State   Command
1   68591   running sleep 12m &
~> ps aux|grep sleep
user          68602   0.0  0.0  2424084    336 s001  R+    4:13PM   0:00.00 grep --color=auto sleep
user          68591   0.0  0.0  2434840    752 s001  S     4:13PM   0:00.00 sleep 12m
~> exit

Open a new terminal

~> ps aux|grep sleep
user          68876   0.0  0.0  2423980    220 s001  R+    4:14PM   0:00.00 grep --color=auto sleep
user          68591   0.0  0.0  2434840    752   ??  S     4:13PM   0:00.00 sleep 12m

Expected behavior:

sleep 12m would not still be running.

Observed behavior:

sleep 12m is still running.

Additional information:


Fish version: fish, version 2.2.0

Operating system: Mac OS X El Capitan 10.11.3.
I seem to have forgotten how I have installed fish, my terminal histories don't have it. I would say it's (Home)brew, and it does state fish is Poured from bottle.

Terminal or terminal emulator: iTerm2 ("xterm-256color")

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsAn issue/PR that touches or should touch the docsenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions