1

I have a bg process disowned like so:

 (idea "$code_home/jenkins-jobs" ) & disown

The problem is it will start writing its stdout/stderr to the terminal from which I launched it. I would have guessed that disowning a process would tell it to write its stdio to /dev/null unless instructed to write it somewhere.

So my question is - how do I completely disown a process so it stops interacting with my terminal altogether? Is it enough to do something like this?

  (idea "$code_home/jenkins-jobs" &> /dev/null ) &> /dev/null & disown
7
  • 2
    related: unix.stackexchange.com/q/8469/4667 Apr 17, 2020 at 20:03
  • 3
    I think it's not necessary to use a subshell. I think: some_program >/dev/null 2>&1 </dev/null & disown is sufficient -- you're forgetting the I in "stdio" Apr 17, 2020 at 20:04
  • thanks glenn, see my comment to your answer. a working example there would help, and please add a working example to this question and I will upvote, ty. Apr 17, 2020 at 20:05
  • 2
    Yes I know, you don't have to repeat it here. I said the other question was "related" not "a duplicate". Apr 17, 2020 at 20:30
  • 1
    disown doesn't do anything else than make bash forget about a job. The disowned process(es) have no clue that they have been disowned. disown will NOT magically cause them to redirect their i/o, stop interacting with the user, survive HUP signals, ignore TTIN signals or other marvelous actions.
    – user313992
    Apr 19, 2020 at 5:36

0

You must log in to answer this question.

Browse other questions tagged .