|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: [OT OBSD Programming] kill cu processes
From: Todd C. Miller (Todd.Miller
courtesan.com)
Date: Wed Sep 01 2004 - 13:31:48 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In message <413580F5.9050302
krachstoff.net>
so spake =?ISO-8859-1?Q?Christian_Sch=E4fer?= (caefer):
> this is no problem until we want to exit.
> how can our programm, that has done the fork() of cu, kill _both_ cu
> processes. right now the self-forked cu process remains as a zombie. we
> don't want this of course..
If it is a zombie that means you need to wait(2) for it. A simple
SIGCHLD handler that does waitpid() should be sufficient. Or,
better yet, just set a flag in the signal handler and so the waiting
in the main process body.
- todd
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]