X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Fexec.c;h=38ca88a0f26c687b5c55ba63b9515f8750e5fae9;hb=d1ae2829ff0fd2a96c16a0c8c5420efaa47d7b30;hp=c9c95500bbaf2cc69d8fdb4e2164dd45ec02d52d;hpb=ccb7f4903325f92555a9722bba74b58346654ba0;p=xscreensaver diff --git a/driver/exec.c b/driver/exec.c index c9c95500..38ca88a0 100644 --- a/driver/exec.c +++ b/driver/exec.c @@ -1,5 +1,5 @@ /* exec.c --- executes a program in *this* pid, without an intervening process. - * xscreensaver, Copyright (c) 1991-2005 Jamie Zawinski + * xscreensaver, Copyright (c) 1991-2013 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 @@ -77,6 +77,7 @@ # define fork vfork #endif /* VMS */ +#include "exec.h" extern const char *blurb (void); @@ -180,8 +181,7 @@ exec_command (const char *shell, const char *command, int nice_level) int hairy_p; #ifndef VMS - if (nice != 0) - nice_process (nice_level); + nice_process (nice_level); hairy_p = !!strpbrk (command, "*?$&!<>[];`'\\\"="); /* note: = is in the above because of the sh syntax "FOO=bar cmd". */ @@ -286,6 +286,7 @@ on_path_p (const char *program) strcat (p2, "/"); strcat (p2, cmd); result = (0 == stat (p2, &st)); + free (p2); if (result) goto DONE; token = strtok (0, ":");