-
- if ((r = waitpid_loop(pid, &status)) < 0)
- return -errno;
-
- if (WIFEXITED(status)) {
- if (WEXITSTATUS(status) != 0) {
- log_warning("/sbin/modprobe failed with error code %i.", WEXITSTATUS(status));
- return -EPROTO;
- }
-
- log_debug("/sbin/modprobe succeeded.");
- return 0;
- }
-
- if (WIFSIGNALED(status)) {
- log_warning("/sbin/modprobe terminated by signal %s.", signal_to_string(WTERMSIG(status)));
- return -EPROTO;