Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
udev: rework how we handle the return value from spawned programs
When running PROGRAM="...", we would log systemd-udevd[447]: Failed to wait spawned command '...': Input/output error no matter why the program actually failed, at error level. The code wouldn't distinguish between an internal failure and a failure in the program being called and run sd_event_exit(..., -EIO) on any kind of error. EIO is rather misleading here, becuase it suggests a serious error. on_spawn_sigchld is updated to set the return code to distinguish failure to spawn, including the program being killed by a signal (a negative return value), and the program failing (positive return value). The logging levels are adjusted, so that for PROGRAM= calls, which are essentially "if" statements, we only log at debug level (unless we get a timeout or segfault or another unexpected error).
- Loading branch information
1 parent
f2e28b5
commit a752114
Showing
2 changed files
with
20 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters