tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: linux has added "close on exec" flags to lots of fd calls
On Mon, Aug 04, 2008 at 01:25:26PM -0400, Steven M. Bellovin wrote:
> I do -- I've seen this failure fairly often, though not as much in
> recent years. It was more common in the days before window systems
> (and especially before job control), when lots of programs had shell
> escapes. Even adventure(6) had one.
(a) For multi-threaded programs, add a good implementation of the POSIX
spawn interface. It is a lot easier to use and can be at least as fast
as vfork + exec, if not faster.
(b) For non-threaded programs, sigprocmask is enough to fix the race.
Many programs should actually think about using closefrom or similiar
functions after fork.
Joerg
Home |
Main Index |
Thread Index |
Old Index