Re: doas closefrom

2015-09-18 Thread Sebastian Benoit
Ted Unangst(t...@tedunangst.com) on 2015.09.17 21:12:28 -0400: > Sebastian Benoit wrote: > > ok, but in other places we have closefrom(STDERR_FILENO + 1) > > is that really more clear? it only makes sense if you know stderr is 2. sure, but writing closefrom(3) requires the same or equivalent

Re: doas closefrom

2015-09-18 Thread Martin Pieuchot
On 18/09/15(Fri) 12:02, Sebastian Benoit wrote: > Ted Unangst(t...@tedunangst.com) on 2015.09.17 21:12:28 -0400: > > Sebastian Benoit wrote: > > > ok, but in other places we have closefrom(STDERR_FILENO + 1) > > > > is that really more clear? it only makes sense if you know stderr is 2. What's

doas closefrom

2015-09-17 Thread Ted Unangst
doas doesn't need any other open files and should probably shut them all. Index: doas.c === RCS file: /cvs/src/usr.bin/doas/doas.c,v retrieving revision 1.41 diff -u -p -r1.41 doas.c --- doas.c 3 Sep 2015 20:05:58 -

Re: doas closefrom

2015-09-17 Thread Sebastian Benoit
ok, but in other places we have closefrom(STDERR_FILENO + 1) Ted Unangst(t...@tedunangst.com) on 2015.09.17 12:11:26 -0400: > doas doesn't need any other open files and should probably shut them all. > > > Index: doas.c > === > RCS

Re: doas closefrom

2015-09-17 Thread Ted Unangst
Sebastian Benoit wrote: > ok, but in other places we have closefrom(STDERR_FILENO + 1) is that really more clear? it only makes sense if you know stderr is 2. if you sometimes forget which is 1 and which is 2, then the macro only makes it more confusing because now you have to decide what comes