remove no-longer-needed special case handling in popen
authorRich Felker <dalias@aerifal.cx>
Mon, 15 Mar 2021 14:26:21 +0000 (10:26 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 15 Mar 2021 14:29:20 +0000 (10:29 -0400)
commit122002f0ddf267977282f05066a0794e31661501
treecbe342cdecae183c3cd311eef0db8225e035fc7f
parent8ef9d46f4d0ff4f0073da6bee7ed0cb5f9035ead
remove no-longer-needed special case handling in popen

popen was special-casing the possibility (only possible when the
parent closed stdin and/or stdout) that the child's end of the pipe
was already on the final desired fd number, in which case there was no
way to get rid of its close-on-exec flag in the child. commit
6fc6ca1a323bc0b6b9e9cdc8fa72221ae18fe206 made this unnecessary by
implementing the POSIX-future requirement that dup2 file actions with
equal source and destination fd values remove the close-on-exec flag.
src/stdio/popen.c