Re: kevents, waitpid() with WNOHANG race
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type; bh=hOCk86tauaNFfA/pc1HZ6301xhYr3GOOyxFWgzWY4vQ=; b=Knm9yEPEJoSS1yFRtH5wk4gBf9/D5J1iILEey70yLEnTQSxI6WlfZX8VCFQzFy8lHb gRBTLNcFVbiXwv8RjOoZx4gqaAfaNvCefeeqKPIOVfzX9ZucRviuuhLE7dL2PzVeA/Gw V9eA+q+YRZuD4FoC5nJUxNCtSj9/Tv7KHsu28= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=uwjgkEqj0k9jZR3fr4eUeKghFiA8jt+YFCYmXE+C2z0ctF9ee5YcSwkoM6dX6164iz CoTqzBy8Mr+GmTHkLJ+Rd23n3yNmaqEHqJ0ksA9onD6Ag9vunDs4SQnkZcseicLCNvQy 2ZFuTnoNQAPmaM3/LE/PeY0WDz2xXQnK6ub54= For the archives: After some stress testing, I've found that there is in fact a race between when kevent() reports that a process exited, and when waitpid() can successfully reap the process. Therefore, it is not safe to use the WNOHANG option with waitpid() and friends to reap a child process, after observing that the child process exited using kevent(). _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Dave Keck