mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 19:17:22 +00:00
fix ipmievd fd closing bug
This commit is contained in:
parent
96dec6ddc7
commit
89199b49f3
@ -344,7 +344,7 @@ ipmi_open_file(const char * file, int rw)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ipmi_start_daemon(void)
|
ipmi_start_daemon(struct ipmi_intf *intf)
|
||||||
{
|
{
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int fd;
|
int fd;
|
||||||
@ -398,10 +398,10 @@ ipmi_start_daemon(void)
|
|||||||
chdir("/");
|
chdir("/");
|
||||||
umask(0);
|
umask(0);
|
||||||
|
|
||||||
#if 0
|
for (fd=0; fd<64; fd++) {
|
||||||
for (fd=0; fd<64; fd++)
|
if (fd != intf->fd)
|
||||||
close(fd);
|
close(fd);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
open("/dev/null", O_RDWR);
|
open("/dev/null", O_RDWR);
|
||||||
dup(0);
|
dup(0);
|
||||||
|
@ -667,7 +667,7 @@ ipmievd_main(struct ipmi_event_intf * eintf, int argc, char ** argv)
|
|||||||
FILE *fp;
|
FILE *fp;
|
||||||
struct stat st1;
|
struct stat st1;
|
||||||
|
|
||||||
ipmi_start_daemon();
|
ipmi_start_daemon(eintf->intf);
|
||||||
|
|
||||||
if (lstat(pidfile, &st1) == 0) {
|
if (lstat(pidfile, &st1) == 0) {
|
||||||
/* already exists, erase first */
|
/* already exists, erase first */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user