1 As for libc's `system', change Awk to look for `sh' in $PATH. This patch is
2 only meant to be used during bootstrapping, where we don't know in advance the
3 absolute file name of `sh'.
5 --- gawk-4.1.3/io.c 2015-05-19 15:37:20.000000000 +0200
6 +++ gawk-4.1.3/io.c 2015-06-09 18:39:36.918414881 +0200
9 set_sigpipe_to_default();
11 - execl("/bin/sh", "sh", "-c", command, NULL);
12 + execlp("sh", "sh", "-c", command, NULL);
13 _exit(errno == ENOENT ? 127 : 126);
18 signal(SIGPIPE, SIG_DFL);
20 - execl("/bin/sh", "sh", "-c", command, NULL);
21 + execlp("sh", "sh", "-c", command, NULL);
22 _exit(errno == ENOENT ? 127 : 126);
26 fatal(_("close of pipe failed (%s)"), strerror(errno));
27 /* stderr does NOT get dup'ed onto child's stdout */
28 set_sigpipe_to_default();
29 - execl("/bin/sh", "sh", "-c", str, NULL);
30 + execlp("sh", "sh", "-c", str, NULL);
31 _exit(errno == ENOENT ? 127 : 126);
33 #endif /* NOT __EMX__, NOT __MINGW32__ */
35 if (close(p[0]) == -1 || close(p[1]) == -1)
36 fatal(_("close of pipe failed (%s)"), strerror(errno));
37 set_sigpipe_to_default();
38 - execl("/bin/sh", "sh", "-c", cmd, NULL);
39 + execlp("sh", "sh", "-c", cmd, NULL);
40 _exit(errno == ENOENT ? 127 : 126);
42 #endif /* NOT __EMX__, NOT __MINGW32__ */