X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Fsubprocs.c;h=65b0079abd86941009eb0cc74662ecaa441838cd;hb=8afc01a67be4fbf3f1cc0fce9adf01b5289a21c6;hp=fb621cdef69fd39b243a27f02a4276a3eb4b3e8c;hpb=50be9bb40dc60130c99ffa568e6677779904ff70;p=xscreensaver diff --git a/driver/subprocs.c b/driver/subprocs.c index fb621cde..65b0079a 100644 --- a/driver/subprocs.c +++ b/driver/subprocs.c @@ -1,5 +1,5 @@ /* subprocs.c --- choosing, spawning, and killing screenhacks. - * xscreensaver, Copyright (c) 1991-2008 Jamie Zawinski + * xscreensaver, Copyright (c) 1991-2014 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -484,6 +484,7 @@ static RETSIGTYPE sigchld_handler (int sig) { saver_info *si = global_si_kludge; /* I hate C so much... */ + in_signal_handler_p++; if (si->prefs.debug_p) { @@ -510,6 +511,7 @@ sigchld_handler (int sig) } init_sigchld(); + in_signal_handler_p--; } #endif /* SIGCHLD */ @@ -1099,6 +1101,7 @@ hack_environment (saver_info *si) if (def_path && *def_path) { const char *opath = getenv("PATH"); + if (! opath) opath = "/bin:/usr/bin"; /* WTF */ char *npath = (char *) malloc(strlen(def_path) + strlen(opath) + 20); strcpy (npath, "PATH="); strcat (npath, def_path);