X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fwhatnowsbr.c;h=121a79baa43b0333b493ecb82179ca0a7ecc0206;hb=72a97a2e44a300808b5584bd3d3581162b107b03;hp=1d21bd355af2e43b439d447ef9ff54d9e13a6e5d;hpb=9f8f8b1e1d553774865f2c177191c359c3dc652c;p=mmh diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 1d21bd3..121a79b 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -605,6 +605,11 @@ system_in_dir(const char *dir, const char *cmd) { char olddir[BUFSIZ]; int r; + + /* ensure that $SHELL exists, as the cmd was written relying on + a non-blank $SHELL... */ + setenv("SHELL","/bin/sh",0); /* don't overwrite */ + if (getcwd(olddir, sizeof(olddir)) == 0) adios("getcwd", "could not get working directory"); if (chdir(dir) != 0) @@ -621,6 +626,11 @@ popen_in_dir(const char *dir, const char *cmd, const char *type) { char olddir[BUFSIZ]; FILE *f; + + /* ensure that $SHELL exists, as the cmd was written relying on + a non-blank $SHELL... */ + setenv("SHELL","/bin/sh",0); /* don't overwrite */ + if (getcwd(olddir, sizeof(olddir)) == 0) adios("getcwd", "could not get working directory"); if (chdir(dir) != 0)