[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT OBSD Programming] kill cu processes



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