Fun with file descriptors
Posted Sep 15, 2007 6:40 UTC (Sat) by
schabi (subscriber, #14079)
In reply to:
Fun with file descriptors by RobSeace
Parent article:
Fun with file descriptors
You wrote:
For instance, this common behavior is fairly reasonable:
close (0);
open ("/dev/null", O_RDONLY);
This one is broken as sonn as threads are involved - typical race condition, another thread could do anything between close(0) and open().
(
Log in to post comments)