Files
yosys/kernel
Simon Bucher aa6108d70f kernel: handle EINTR and signal termination in run_command
When `run_command` reads subprocess output via `fgets` in a multi-threaded process, incoming signals can interrupt the underlying `read` syscall with `EINTR`. Previously, `while (fgets(...) != NULL)` exited the read loop immediately on `EINTR` and called `pclose`, closing the pipe early while the child was still running (or causing the child to die with `SIGPIPE`). Additionally, `run_command` returned `WEXITSTATUS(ret)` without checking `WIFEXITED(ret)`, which evaluates to `0` when a child terminates due to an unhandled signal.

Retry `fgets` after clearing the stream error state when `ferror(f) && errno == EINTR`, and return `-1` if `!WIFEXITED(ret)`.
2026-09-30 07:30:59 +00:00
..
2026-07-06 13:26:00 +02:00
2026-06-23 07:23:41 +02:00
2026-03-31 09:37:18 +01:00
2026-06-23 07:24:59 +02:00
2026-04-13 22:34:46 +02:00
2026-06-23 07:24:59 +02:00
2026-06-23 07:23:41 +02:00
2026-03-04 12:22:14 +01:00
2026-05-08 20:59:24 -07:00
2026-05-08 20:59:24 -07:00
2026-03-04 12:22:14 +01:00
2026-05-08 20:59:24 -07:00
2025-11-19 15:20:50 +01:00
2026-03-06 02:03:21 +00:00
2026-09-15 14:29:36 +02:00
2026-09-15 14:29:36 +02:00
2026-06-23 07:24:59 +02:00
2025-03-19 13:43:44 +01:00
2026-09-01 14:29:02 +02:00
2026-09-01 14:29:02 +02:00
2026-06-23 07:23:41 +02:00
2026-09-15 14:29:36 +02:00
2026-07-09 16:05:15 +12:00
2026-07-09 16:05:15 +12:00
2025-09-16 03:17:23 +00:00
2026-06-23 07:23:41 +02:00
2025-09-16 03:17:23 +00:00
2026-05-08 20:59:24 -07:00
2026-08-27 23:10:40 +06:00
2026-08-27 23:10:40 +06:00
2026-07-31 10:31:44 +02:00
2026-08-31 22:13:01 +02:00
2026-08-31 22:13:01 +02:00
2026-05-08 20:59:24 -07:00
2026-06-03 08:58:10 +00:00
2026-05-08 20:59:24 -07:00
2026-06-23 07:24:59 +02:00
2025-09-16 03:17:23 +00:00
2025-01-14 12:39:15 +01:00