- catch errors from daemon()

OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=10
This commit is contained in:
Olaf Hering 2011-06-17 08:59:14 +00:00 committed by Git OBS Bridge
parent 0298cd91bd
commit e91674f4b8
2 changed files with 9 additions and 1 deletions

View File

@ -331,7 +331,10 @@ int main(void)
char *key_value;
char *key_name;
daemon(1, 0);
if (daemon(1, 0) < 0) {
perror("daemon");
return 1;
}
openlog("KVP", 0, LOG_USER);
syslog(LOG_INFO, "KVP starting; pid is:%d", getpid());
/*

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jun 17 10:58:42 CEST 2011 - ohering@suse.de
- catch errors from daemon()
-------------------------------------------------------------------
Fri Jun 17 10:33:50 CEST 2011 - ohering@suse.de