![]() Your shell has no business with the processes' FD setup, that's purely something the process itself manages. ![]() If you launch your process and tell it that its stdout is your terminal (which is what you do by default), then that process is configured to output to your terminal. What you can't do, is change the stdout/stderr/stdin of a process after having launched it. Unlike nohup, disown is used after the process has been launched and backgrounded. What this basically means is that you can't use fg, bg on it anymore, but more importantly, when you close your shell it won't hang or send a SIGHUP to that child anymore. Because of the way nohup works, you can't just apply it to a running process.ĭisown is a bash builtin that removes a shell job from the shell's job list. However, you need to have had the foresight to have used it before you started the application. Nohup is a program you can use to run your application with such that its stdout/stderr can be sent to a file instead and such that closing the parent script won't SIGHUP the child. To run it in the background silenced, use this: firefox /dev/null & You can start a process as backgrounded immediately by appending a "&" to the end of it: firefox & It's now a "job", and its stdout/ stderr/ stdin are still connected to your terminal. First of all once you've started a process, you can background it by first stopping it (hit Ctrl- Z) and then typing bg to let it resume in the background.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |