mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 02:57:22 +00:00
connect before fork to return error to initscript if needed
This commit is contained in:
parent
b800400c41
commit
ac40435a4a
@ -640,6 +640,16 @@ ipmievd_main(struct ipmi_event_intf * eintf, int argc, char ** argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We need to open interface before forking daemon
|
||||||
|
* so error messages are not lost to syslog and
|
||||||
|
* return code is successfully returned to initscript
|
||||||
|
*/
|
||||||
|
if (intf->open(intf) < 0) {
|
||||||
|
lprintf(LOG_ERR, "Unable to open interface");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (daemon) {
|
if (daemon) {
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
struct stat st1;
|
struct stat st1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user