Hi Brian,

On Fri, 2003-02-07 at 03:15, [EMAIL PROTECTED] wrote:
> void do_real_exit(int ID, void *data)
> {
>    int status;
> 
>    /* Kill all our children and exit */
> 
>    printf("real exit here\n");
>    kill(0,9);
>    waitpid(pid,&status,0);
>    exit(0);
> }
> 
> void Exit_cb(GtkWidget *ob, long data)
> {
>    /* Try to exit gracefully, wait 1 second, do real exit */
> 
>    write(out_pipe,"q\n\n\n",4);
>    gtk_timeout_add(2000,(GtkFunction)do_real_exit,0);
> }
> 
> 
> Is the kill(0,9) really necessary?  Surely, if it is, then there is a
> bug in lavplay, no?

it writes q\n, which quits lavplay nicely. After that, lavplay should be
long gone when do_real_exit() is called. If not, then something is
surely wrong and we'd better kill lavplay as evilly as possible to
prevent zombie processes, so we kill -9 it.

Normally, the kill -9 won't do anything because there won't be any open
child processes. I'd call this "not a bug, but a feature".

Ronald

-- 
Ronald Bultje <[EMAIL PROTECTED]>
Linux Video/Multimedia developer



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to