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-05-20 08:27:07 -04:00
2020-10-15 11:28:13 +02:00
2020-09-28 12:27:08 -07:00
2020-08-21 12:48:46 +08:00
2020-12-03 12:56:36 +01:00
2020-04-30 18:02:04 +08:00
2020-12-07 12:59:48 +01:00
2020-12-03 12:56:37 +01:00
2020-10-12 12:14:53 -07: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-10-27 23:08:48 -07:00
2020-08-20 17:55:06 +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-10-01 00:33:38 +02:00
2020-07-06 03:52:37 +02:00
2020-10-09 14:29:04 +03:00
2020-10-09 14:29:04 +03:00
2020-08-12 09:22:07 +01:00
2020-11-19 16:30:54 +01:00
2020-11-26 09:07:33 +00:00
2020-10-12 15:35:08 -07:00
2020-07-03 20:43:55 -07: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-10-25 16:51:21 +01: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-05-28 09:55:39 +03:00
2020-05-28 09:55:39 +03:00
2020-07-30 13:57:54 -07:00
2020-05-26 17:27:15 -04:00
2020-06-21 06:41:55 -04:00
2020-10-01 22:22:56 -07:00
2020-08-27 20:07:27 -04:00
2020-11-16 10:40:56 +01:00
2020-09-29 10:20:05 +02:00
2020-09-29 09:59:51 +03:00
2020-09-29 09:59:52 +03:00
2020-10-25 14:25:00 +01:00
2020-11-18 12:00:57 -05:00
2020-11-18 12:00:57 -05:00
2020-07-01 14:44:28 -04:00
2020-07-01 14:44:28 -04:00
2020-10-22 21:45:10 +03:00
2020-11-26 09:05:59 +00:00
2020-11-20 05:36:01 +01:00
2020-09-04 10:25:44 +01:00
2020-07-08 14:26:14 +03:00
2020-11-04 12:16:57 -05:00
2020-05-20 07:30:29 -04:00
2020-06-16 15:15:46 -04:00
2020-10-12 02:06:32 -07:00
2020-11-26 09:05:59 +00:00
2020-11-23 21:02:54 +00:00
2020-05-13 16:20:13 -04:00
2020-10-22 21:45:20 +03:00
2020-12-15 17:21:06 +01:00
2020-12-06 00:22:40 +00:00
2020-08-18 18:03:57 +00:00
2020-06-07 17:03:49 +02:00
2020-05-28 09:54:24 +03:00
2020-12-01 09:39:56 +01:00
2020-10-14 11:18:12 -04:00
2020-05-12 18:03:39 +03:00
2020-10-27 19:40:44 +01:00
2020-10-14 11:18:12 -04:00
2020-10-14 11:18:12 -04:00
2020-11-07 07:50:59 +01:00
2020-11-26 14:56:25 -08:00
2020-07-30 13:57:54 -07:00
2020-06-15 08:08:19 -04:00
2020-09-04 09:46:44 -07:00
2020-10-12 12:14:53 -07:00
2020-10-12 12:14:53 -07:00
2020-12-07 23:57:55 +01:00
2020-10-27 11:14:58 -04: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-10-15 19:21:38 +02:00
2020-05-11 00:20:57 +02:00
2020-06-27 11:49:28 -04:00
2020-05-05 04:45:59 +03:00
2020-07-01 18:03:12 -04:00
2020-11-26 09:05:59 +00:00
2020-04-30 18:02:03 +08:00
2020-10-09 16:42:50 +02:00
2020-10-09 16:42:50 +02:00
2020-06-24 16:32:19 -04:00
2020-11-26 09:05:59 +00:00
2020-10-12 17:17:56 -07:00
2020-12-01 18:36:39 +01:00
2020-08-10 21:30:42 +08:00
2020-04-30 09:19:14 -04:00
2020-11-09 21:21:30 +01:00
2020-09-22 17:08:08 +02:00
2020-06-21 06:02:59 -04:00
2020-06-21 06:02:59 -04:00
2020-10-09 10:32:19 +02:00
2020-12-15 17:21:06 +01:00
2020-12-15 17:21:06 +01:00
2020-09-22 22:31:31 +02:00
2020-09-22 22:31:31 +02:00
2020-11-25 15:18:33 +01:00
2020-10-09 16:42:49 +02:00
2020-11-26 14:42:00 +01:00
2020-11-25 17:02:20 +01:00
2020-08-18 10:46:53 +03:00
2020-10-12 19:50:16 -07:00
2020-12-01 18:36:39 +01:00
2020-10-22 21:45:20 +03:00
2020-10-01 19:00:07 +03:00
2020-07-29 07:53:19 +02:00
2020-07-01 14:44:24 -04:00
2020-10-23 14:41:40 +02:00
2020-12-01 18:36:39 +01:00
2020-12-01 18:36:39 +01:00
2020-10-12 12:14:53 -07:00
2020-10-12 11:01:16 -07:00
2020-10-12 11:01:16 -07:00
2020-12-07 12:59:48 +01:00
2020-12-03 12:56:37 +01:00
2020-09-22 11:34:30 -04:00
2020-09-22 11:34:30 -04:00
2020-09-17 22:17:17 +02:00
2020-10-12 17:18:47 -07:00
2020-07-29 16:36:44 +07:00
2020-11-03 14:01:40 +01:00
2020-11-03 14:01:40 +01:00