Thread View: news.software.nntp
2 messages
2 total messages
Started by Simon J. Gerraty
Fri, 05 Oct 1990 01:17
nntp-1.5.8 server/spawn.c patch for stupid exec's
Author: Simon J. Gerraty
Date: Fri, 05 Oct 1990 01:17
Date: Fri, 05 Oct 1990 01:17
27 lines
1574 bytes
1574 bytes
Some UNIX systems cannot handle exec'ing a shell script.
These are usually the same systems whose shell's do not grok #!/bin/sh
The following simple patch, handles the case where execl fails due to ENOEXEC
and simply punts the thing to /bin/sh to try.
*** spawn.c~1~ Thu Oct 4 14:34:50 1990
--- spawn.c Thu Oct 4 15:09:14 1990
***************
*** 164,169 ****
--- 164,175 ----
}
execl(path, name, flag, (char *) NULL);
+ /*
+ * 90-10-04 <sjg@melb.bull.oz.au>
+ * stupid exec()'s barf trying to exec a shell script!
+ */
+ if (errno == ENOEXEC)
+ execl("/bin/sh", "-c", path, flag, (char *) NULL);
fprintf(stderr, "spawn: execl ");
perror(path);
_exit(-1); /* Error */
--
Simon J. Gerraty <sjg@sun0.melb.bull.oz.au>
#include <disclaimer> /* imagine something *very* witty here */
Re: nntp-1.5.8 server/spawn.c patch for stupid exec's
Author: Paul Eggert
Date: Sun, 07 Oct 1990 02:00
Date: Sun, 07 Oct 1990 02:00
6 lines
845 bytes
845 bytes
sjg@sun0.melb.bull.oz.au (Simon J. Gerraty) writes:
>+ execl("/bin/sh", "-c", path, flag, (char *) NULL);
Surely the ``"-c",'' is mistaken.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads