Mercurial > hg > toybox
changeset 1429:8c78a7e5486d draft
Disable xopen's default O_CLOEXEC for oneit.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 09 Aug 2014 23:49:48 -0500 |
parents | e66fb422b78a |
children | e19c00f44c31 |
files | toys/other/oneit.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/toys/other/oneit.c Sat Aug 09 14:33:34 2014 -0500 +++ b/toys/other/oneit.c Sat Aug 09 23:49:48 2014 -0500 @@ -65,7 +65,8 @@ setsid(); for (i=0; i<3; i++) { close(i); - xopen(TT.console ? TT.console : "/dev/tty0", O_RDWR); + // Remember, O_CLOEXEC is backwards for xopen() + xopen(TT.console ? TT.console : "/dev/tty0", O_RDWR|O_CLOEXEC); } // Can't xexec() here, because we vforked so we don't want to error_exit().