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:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=v1mTSX18UW+jtAp+jyxYFjw20TpuBYyiJ8AGW43KWQw=; b=l9/+Ei5fV+GYIOGHBgt5X5ZjoQWTlHsojMqdgE7XFtMPVv/h3kO6C73GvoYK5XpOb6 XiGUvuEdSqJ8wBYF/j6LS+d4qvYpQIrA9gFvHJYu/WhmTO4+dhDJgjs4em8knA3JlkNl CzY+/IHuQgxDbcKuSdcuFpOs6SMwoHcJJzbKw= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; b=tc+vHV04K46xqyHXeBOy3kqZjyZPpsFJ3+6EVBoeV79X0F+qd3yKazSIbCghPUr3dC 12fQecs6NimaYwl3MPuUobwX+tfDb/bYLccGPmqtTFC1gtbhD5WaaEiS41RYHN8J3sLE wwmBxmcHtzEgqGzNK/i6YXCetYAng8L41MKSw= Hey list, I'm using kevents to wait for a child process to exit (EVFILT_PROC, NOTE_EXIT). Once kevent() reports that the process exited, I use waitpid() to get its exit status. (I'm using kevents to actually do the waiting so I can enforce a timeout.) When I call waitpid(), I specify the WNOHANG option. Intuitively, I would assume that this option would be safe because by the time I call waitpid(), kevent() already reported that the child exited. But I'm wondering if this is always the case: will waitpid() ever return 0 when using WNOHANG, because of some ordering in the kernel where the kevent machinery notices a process exited before waitpid() would be able to? Thanks! David _______________________________________________ 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