User Tools

Site Tools


continue_running_already_back_grounded_jobs

Use the disown shell builtin to exit the shell but continue running already back grounded jobs. The syntax changes from shell to shell.

zsh

disown [ job ... ]

bash

disown [-ar] [-h] [jobspec ...]

Example:

foo &
disown %1
exit

Relevant commands:

  • find the parent pid
ps xao pid,ppid,comm | grep foo
  • get information on a process
ps aux | grep NNNN

Ref:-

Note:- To attach a disowned job, the instructions in https://unix.stackexchange.com/questions/31824/how-do-i-attach-a-terminal-to-a-detached-process might be helpful. But I have not tried them.

tags | continue running the jobs in the background, detach

continue_running_already_back_grounded_jobs.txt · Last modified: 2021/05/09 20:35 by raju