Background processes & daemons

Rick Lewis rick at ctdi.UUCP
Fri Dec 29 02:04:29 AEST 1989


    This is more or less a two part question.  I am trying to learn about
daemons and the best way to implement them.  After looking at the various
resources here, I have come up empty so this was the next best place.  Please
EMAIL all responses.  Our system tends to lose rn messages.

    Part 1:
        What steps can I take to ensure that a background process will die
        once the interactive process logs off?  I have noticed that some
        processes on our sun 386i running BSD unix and our Sequent running
        Dynix remain alive even after I have logged off and then on again.
        These processes were put into the background using fork from within
        the program.

    Part 2:
        In writing a daemon program, what steps should be taken to tie up all 
        loose ends before or after the process forks.  IE: stdout, stdin etc.

If anyone can recommend any books concerning this subject, that would also be
appreciated.  Thanks...
-- 
Rick Lewis  			|| uucp: rick at ctdi.UUCP
Communications Test Design, Inc.||	 ...!uunet!cbmvax!ctdi1!ctdi!rick
1373 Enterprise Drive           ||
West Chester, Pa  19380		|| voice: (215) 436-5203



More information about the Comp.lang.c mailing list