Sponsored Content
Full Discussion: deamonizing
Top Forums Programming deamonizing Post 302072315 by Perderabo on Monday 1st of May 2006 01:09:44 PM
Old 05-01-2006
The code shown in that link will allow the deamon to remain a session group leader. If a daemon who is a session group leader opens a tty device without specifying the O_NOCTTY flag, the daemon will un-daemonize itself. That is why I prefer: 1.7 How do I get my program to act like a daemon?
 
setpgrp3(2)							System Calls Manual						       setpgrp3(2)

NAME
setpgrp3 - create session and set process group ID; for HP-UX 9.x compatibility. SYNOPSIS
DESCRIPTION
If the calling process is not a process group leader, creates a new session. The calling process becomes the session leader of this new session, it becomes the process group leader of a new process group, and it has no controlling terminal. The process group ID of the call- ing process is set equal to the process ID of the calling process. The calling process is the only process in the new process group, and the only process in the new session. function is provided for HP-UX compatibility in future releases. is functionally equivalent to as provided in HP-UX 9.x. RETURN VALUE
Upon successful completion, returns the value of the process group ID of the calling process. Otherwise, it returns a value of and sets to indicate the error. ERRORS
No errors are defined. WARNINGS
Obsolescent Interfaces is to be obsoleted at a future date. AUTHOR
was developed by HP. SEE ALSO
exec(2), exit(2), fork(2), getpid(2), kill(2), setpgid(2), setpgrp(2), setsid(2), signal(2), termio(7). TO BE OBSOLETED setpgrp3(2)
All times are GMT -4. The time now is 02:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy