We want to allow builds in chroots that lack /bin/sh. Thus, system(3) and popen(3) need to be tweaked to use the right shell. For the bootstrap glibc, we just use whatever `sh' can be found in $PATH. The final glibc instead uses the hard-coded absolute file name of `bash'. --- a/sysdeps/posix/system.c +++ b/sysdeps/posix/system.c @@ -134,7 +134,7 @@ do_system (const char *line) INIT_LOCK (); /* Exec the shell. */ - (void) __execve (SHELL_PATH, (char *const *) new_argv, __environ); + (void) __execvpe (SHELL_NAME, (char *const *) new_argv, __environ); _exit (127); } else if (pid < (pid_t) 0) --- b/libio/iopopen.c 2012-06-30 21:12:34.000000000 +0200 +++ b/libio/iopopen.c 2012-12-19 12:52:29.000000000 +0100 @@ -226,7 +226,7 @@ _IO_new_proc_open (fp, command, mode) _IO_close (fd); } - _IO_execl ("/bin/sh", "sh", "-c", command, (char *) 0); + execlp ("sh", "sh", "-c", command, (char *) 0); _IO__exit (127); } _IO_close (child_end); /'>aboutsummaryrefslogtreecommitdiff
path: root/nix/scripts
AgeCommit message (Expand)Author
2017-12-31list-runtime-root: Fix off-by-one in 'strip-drop' call....Ludovic Courtès
2017-11-26list-runtime-roots: Ignore ESRCH while reading from /proc....Ludovic Courtès
2017-11-12list-runtime-roots: Ignore PIDs we cannot access....Ludovic Courtès
2017-11-12list-runtime-roots: Canonicalize store items....Ludovic Courtès
2017-11-12list-runtime-roots: Do not use 'lsof'....Ludovic Courtès
2017-03-08list-runtime-roots: Bufferize the lsof pipe....Ludovic Courtès
2016-11-16daemon: Add "builtin:download" derivation builder....Ludovic Courtès
2015-03-25Rename 'guix substitute-binary' to 'guix substitute'....Ludovic Courtès
2014-05-16list-runtime-roots: Don't display a backtrace on 2.0.5 when lsof is lacking....Ludovic Courtès
2014-01-24Add 'guix offload' as a daemon build hook....Ludovic Courtès
2013-12-20daemon: Implement signed archive import/export....Ludovic Courtès
2013-10-29list-runtime-roots: List files referenced by environment variables....Ludovic Courtès