Here are some of the steps for creating a daemon process from a given process,
the given process exists soon after forking a child,
the child calls start a new session and also a new group, by
setsid()
But I seem to find cases with only the first step without the second step:
What is the purpose of only having the first step without the second step?
Does it not want to create a daemon but something else?
Thanks.
setuid()
in your question tosetsid()
, which makes my remark aboutsetuid()
no longer applicable. – Ljm Dullaart Dec 29 '18 at 13:26