From: Patrick M. <pa...@us...> - 2003-11-15 23:48:27
|
Update of /cvsroot/gphoto/gtkam/src In directory sc8-pr-cvs1:/tmp/cvs-serv432/src Modified Files: gtkam-save.c Log Message: don't try to exec a callout viewer if the program name is empty. If you specify a viewer, their is still the odd behaviour of the parent exec-ing the viewer and finishing, make it look like gtkam completed. Index: gtkam-save.c =================================================================== RCS file: /cvsroot/gphoto/gtkam/src/gtkam-save.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- gtkam-save.c 13 Jul 2003 08:08:02 -0000 1.39 +++ gtkam-save.c 15 Nov 2003 23:47:47 -0000 1.40 @@ -334,7 +334,18 @@ gtk_widget_show (dialog); } else { progname = gtk_entry_get_text (save->priv->program); - if (progname && fork ()) { + if (progname && progname[0] != '\0' && fork ()) { + /* + * The parent process execs. This means the child + * becomes the gtkam, and the parent exits after + * the viewer runs. + * + * If you specify a viewer, the originating gtkam + * appears to complete. This should really leave + * the parent, and have the child exec, but then + * we need a child reaper based on signal + * handling. + */ execlp (progname, progname, full_path, NULL); _exit (0); } |