-
- for (;;) {
- if (waitpid(pid, &status, 0) < 0) {
-
- if (errno == EINTR)
- continue;
-
- return -errno;
- }
-
- break;
- }
-
- 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;