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
  • 2
    related: https://unix.stackexchange.com/q/8469/4667 – glenn jackman Apr 17 '20 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" – glenn jackman Apr 17 '20 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. – Alexander Mills Apr 17 '20 at 20:05
  • Feel free to test it out and add your own answer. – glenn jackman Apr 17 '20 at 20:12
  • thanks, I added a comment to the other answer, I said: "thanks, in this case I am looking to issue 1 command from the shell, and the rest be done automatically without more interaction from me" – Alexander Mills Apr 17 '20 at 20:25
  • 2
    Yes I know, you don't have to repeat it here. I said the other question was "related" not "a duplicate". – glenn jackman Apr 17 '20 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. –  Apr 19 '20 at 05:36

0 Answers0