Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/bin/sh
Module Name: src
Committed By: christos
Date: Sat Mar 12 21:35:13 UTC 2016
Modified Files:
src/bin/sh: eval.c redir.c redir.h
Log Message:
Don't close-on-exec redirections created explicitly for the command being
ran; i.e. we want this to work:
$ cat succ1
#!/bin/sh
./succ2 6>out
$ cat succ2
#!/bin/sh
echo succ2 >&6
$ ./succ1
And this to fail:
$ cat fail1
#!/bin/sh
exec 6> out
echo "fail1" >&6
./fail2
exec 6>&-
$ cat fail2
#!obj.amd64/sh
echo "fail2" >&6
$ ./fail1
./fail2: 6: Bad file descriptor
XXX: Do we want a -k (keep flag on exec to make redirections not close-on-exec?
To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/bin/sh/eval.c
cvs rdiff -u -r1.39 -r1.40 src/bin/sh/redir.c
cvs rdiff -u -r1.17 -r1.18 src/bin/sh/redir.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index