Terminating multiple processes

David Nadlinger code at klickverbot.at
Fri Feb 2 01:09:28 UTC 2018


On Thursday, 1 February 2018 at 11:42:32 UTC, Russel Winder wrote:
> The problem is actually a thread blocked in an inotify blocking 
> read. As both Steven and yourself have pointed out I am going 
> to have to use a timeout to check the state of the application.

There are better solutions (select/...), But couldn't you in 
theory just send a custom signal to the thread (which you 
ignore), and then check for the exit flag after the syscall 
returned EINTR?

The DInotify wrapper might of course have the retry loop 
hardcoded; I didn't check.

  —David


More information about the Digitalmars-d-learn mailing list