(pid: i32)
| 1301 | } |
| 1302 | |
| 1303 | fn install_signal_forwarding(pid: i32) { |
| 1304 | unsafe { |
| 1305 | libc::signal( |
| 1306 | libc::SIGINT, |
| 1307 | forward_signal as *const () as libc::sighandler_t, |
| 1308 | ); |
| 1309 | libc::signal( |
| 1310 | libc::SIGTERM, |
| 1311 | forward_signal as *const () as libc::sighandler_t, |
| 1312 | ); |
| 1313 | } |
| 1314 | CHILD_PID.store(pid, Ordering::Relaxed); |
| 1315 | } |
| 1316 | |
| 1317 | /// Async-signal-safe handler that forwards SIGTERM to every process we |
| 1318 | /// own: the libkrun VM worker and the gvproxy helper. We cannot rely on |
no outgoing calls
no test coverage detected