From: <enl...@li...> - 2000-11-23 22:25:32
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : camE Modified Files: webcam.c Log Message: fork and die =================================================================== RCS file: /cvsroot/enlightenment/misc/camE/webcam.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- webcam.c 2000/11/09 23:22:35 1.10 +++ webcam.c 2000/11/23 22:25:31 1.11 @@ -154,7 +154,8 @@ } } -Imlib_Image grab_one(int *width, int *height) +Imlib_Image +grab_one(int *width, int *height) { Imlib_Image im; int i = 0; @@ -271,7 +272,8 @@ } } -Imlib_Image convert_rgb_to_imlib2(unsigned char *mem, int width, int height) +Imlib_Image +convert_rgb_to_imlib2(unsigned char *mem, int width, int height) { Imlib_Image im; DATA32 *data, *dest; @@ -382,6 +384,16 @@ char filename[100]; int width, height, i; struct stat st; + pid_t childpid; + + /* fork and die */ + if ((childpid = fork()) < 0) + { + fprintf(stderr, "fork (%s)\n", strerror(errno)); + return (2); + } + else if (childpid > 0) + exit(0); /* parent */ /* read config */ sprintf(filename, "%s/%s", getenv("HOME"), ".camErc"); |