Ghosts of Unix past, part 2: Conflated designs
Ghosts of Unix past, part 2: Conflated designs
Posted Nov 8, 2010 19:54 UTC (Mon) by dd9jn (✭ supporter ✭, #4459)In reply to: Ghosts of Unix past, part 2: Conflated designs by Yorick
Parent article: Ghosts of Unix past, part 2: Conflated designs
An easier and compatible fix would be a system call to close all file descriptors except those given to that call. The workaround everyone uses today, figuring out the maximum number file descriptors possible and call close(2) for each of them, is quite expensive in terms of system calls (~1000 calls in standard situations).
Posted Nov 8, 2010 21:13 UTC (Mon)
by Yorick (guest, #19241)
[Link] (5 responses)
Posted Nov 11, 2010 1:10 UTC (Thu)
by jonabbey (guest, #2736)
[Link] (3 responses)
Posted Nov 11, 2010 2:38 UTC (Thu)
by foom (subscriber, #14868)
[Link]
Posted Nov 11, 2010 3:30 UTC (Thu)
by quotemstr (subscriber, #45331)
[Link]
Posted Nov 17, 2010 0:23 UTC (Wed)
by mhelsley (guest, #11324)
[Link]
Posted Nov 11, 2010 11:28 UTC (Thu)
by dd9jn (✭ supporter ✭, #4459)
[Link]
Ghosts of Unix past, part 2: Conflated designs
But it would still be inferior to having CLOEXEC by default (or passing a list of descriptors to preserve to exec). It is way too easy to leak descriptors by accident or because of careless code in a library.
Ghosts of Unix past, part 2: Conflated designs
Ghosts of Unix past, part 2: Conflated designs
Ghosts of Unix past, part 2: Conflated designs
Ghosts of Unix past, part 2: Conflated designs
Ghosts of Unix past, part 2: Conflated designs