Wladimir J. van der Laan
cd03513dc2
init: Signal-safe instant shutdown
...
Replace the 200ms polling loop with a faster and more efficient waiting
operation.
This was tried a few times before, but given up every time because
solutions use a condition variable which is not safe for use in signals
as they need to be reentrant.
On UNIX-ish OSes, use a safe way: a pipe. When shutdown is requested
write a dummy byte to the pipe. Waiting for shutdown is a matter of a
blocking read from the pipe.
On Windows, there are no signals so using a condition variable is safe.
2020-12-15 17:21:06 +01:00
..
2020-11-25 14:38:33 +02:00
2020-12-03 12:56:36 +01:00
2020-12-07 12:59:48 +01:00
2020-12-03 12:56:37 +01:00
2020-12-04 08:22:45 +01:00
2020-12-07 14:09:53 +01:00
2020-12-06 00:22:40 +00:00
2020-12-07 12:59:48 +01:00
2020-11-19 15:48:24 +01:00
2020-12-04 11:07:28 +01:00
2020-12-06 00:22:40 +00:00
2020-11-19 16:30:54 +01:00
2020-11-26 09:07:33 +00:00
2020-11-26 09:05:59 +00:00
2020-11-26 09:05:59 +00:00
2020-11-18 12:00:57 -05:00
2020-11-18 12:00:57 -05:00
2020-11-28 18:43:55 -05:00
2020-11-18 12:00:57 -05:00
2020-11-28 18:43:55 -05:00
2020-11-18 12:00:57 -05:00
2020-12-15 17:21:06 +01:00
2020-11-16 10:40:56 +01:00
2020-11-18 12:00:57 -05:00
2020-11-18 12:00:57 -05:00
2020-11-26 09:05:59 +00:00
2020-11-20 05:36:01 +01:00
2020-11-04 12:16:57 -05:00
2020-11-26 09:05:59 +00:00
2020-11-23 21:02:54 +00:00
2020-12-15 17:21:06 +01:00
2020-12-06 00:22:40 +00:00
2020-12-01 09:39:56 +01:00
2020-11-07 07:50:59 +01:00
2020-11-26 14:56:25 -08:00
2020-12-07 23:57:55 +01:00
2020-11-20 15:11:21 +01:00
2020-12-04 11:19:15 +01:00
2020-11-16 15:54:24 -03:00
2020-11-16 07:57:34 +01:00
2020-11-26 09:05:59 +00:00
2020-11-26 09:05:59 +00:00
2020-12-01 18:36:39 +01:00
2020-11-09 21:21:30 +01:00
2020-12-15 17:21:06 +01:00
2020-12-15 17:21:06 +01:00
2020-11-25 15:18:33 +01:00
2020-11-26 14:42:00 +01:00
2020-11-25 17:02:20 +01:00
2020-12-01 18:36:39 +01:00
2020-12-01 18:36:39 +01:00
2020-12-01 18:36:39 +01:00
2020-12-07 12:59:48 +01:00
2020-12-03 12:56:37 +01:00
2020-11-03 14:01:40 +01:00
2020-11-03 14:01:40 +01:00