▲ 42 ▼ What are some of your most useful or favorite terminal commands? (literature.cafe) submitted 10 months ago by cm0002@literature.cafe to c/linux@programming.dev 45 comments fedilink hide all child comments OQB @marighost@piefed.social
[–] stewie410@programming.dev 5 points 10 months ago (2 children) Shouldn't you end with & disown to fully detach? permalink fedilink source parent hideshow 2 child comments replies: [–] Object@sh.itjust.works 3 points 10 months ago* (1 child) IIRC disown is a shell built-in command, so its use is a bit limited. Not sure if & is also a built-in, but I found disown to not work in some situations. Besides, it's shorter. permalink fedilink source parent hideshow 1 child comment replies: [–] stewie410@programming.dev 2 points 10 months ago shell built-in command After looking into it a bit more, its at least a builtin for bash but is otherwise not POSIX. I guess nohup ... & would be the POSIX compliant equivalent, though still not a builtin. Its my understanding that & backgrounds, not necessarily detaches, a process -- if the parent process closes, I think the background tasks would still be wait()ed on, if only using &. permalink fedilink source parent
[–] Object@sh.itjust.works 3 points 10 months ago* (1 child) IIRC disown is a shell built-in command, so its use is a bit limited. Not sure if & is also a built-in, but I found disown to not work in some situations. Besides, it's shorter. permalink fedilink source parent hideshow 1 child comment replies: [–] stewie410@programming.dev 2 points 10 months ago shell built-in command After looking into it a bit more, its at least a builtin for bash but is otherwise not POSIX. I guess nohup ... & would be the POSIX compliant equivalent, though still not a builtin. Its my understanding that & backgrounds, not necessarily detaches, a process -- if the parent process closes, I think the background tasks would still be wait()ed on, if only using &. permalink fedilink source parent
[–] stewie410@programming.dev 2 points 10 months ago shell built-in command After looking into it a bit more, its at least a builtin for bash but is otherwise not POSIX. I guess nohup ... & would be the POSIX compliant equivalent, though still not a builtin. Its my understanding that & backgrounds, not necessarily detaches, a process -- if the parent process closes, I think the background tasks would still be wait()ed on, if only using &. permalink fedilink source parent