emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Concurrency, again


From: Herring, Davis
Subject: RE: Concurrency, again
Date: Thu, 20 Oct 2016 07:12:08 +0000

> we do that by calling waitpid() but then the kernel discards the child
> process’s status info, so the "correct" thread can no longer respond
> to the signal by making another waitpid() call to collect the status
> info.  We’d have to save the info the first time we call waitpid().
> But doing it from within the signal handler could be tricky, because
> in that context we’re limited to async-signal-safe functions, and
> helpful routines like malloc() and pthread_mutex_lock() aren’t on the
> list.

waitid() supports the WNOWAIT flag that peeks at the child information without 
destroying it: 
http://pubs.opengroup.org/onlinepubs/9699919799/functions/waitid.html

Davis



reply via email to

[Prev in Thread] Current Thread [Next in Thread]