authbind-helper is documented as indicating an errno value in its exit
status. When the exit status is small enough that it's unlikely to
have come from the runtime system, print it as an errno value instead
of using lg_exitstatus.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
FAIL("waitpid for authbind");
}
if (status) {
- lg_exitstatus(FAIL_LG,status,"authbind");
+ if (WIFEXITED(status) && WEXITSTATUS(status)<127) {
+ int es=WEXITSTATUS(status);
+ lg_perror(FAIL_LG,es,
+ "authbind exited with error exit status %d;"
+ " indicates error",es);
+ } else {
+ lg_exitstatus(FAIL_LG,status,"authbind");
+ }
goto failed;
}
} else {