| Server IP : 82.208.35.60 / Your IP : 216.73.216.238 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/sysutils/scanbuttond/files/ |
Upload File : |
--- scanbuttond.c.orig Fri Feb 17 00:23:53 2006
+++ scanbuttond.c Thu Apr 6 00:52:29 2006
@@ -223,8 +223,15 @@
exit(EXIT_FAILURE);
}
+ openlog(NULL, 0, LOG_DAEMON);
+
// daemonize
if (daemonize) {
+ if (daemon(0, 0) != 0) {
+ syslog(LOG_ERR, "daemon() failed.");
+ }
+ }
+/*
pid = fork();
if (pid < 0) {
printf("Can't fork!\n");
@@ -259,6 +266,7 @@
close(STDOUT_FILENO);
close(STDERR_FILENO);
}
+*/
// setup the environment
char* oldpath = getenv("PATH");
@@ -292,7 +300,7 @@
signal(SIGHUP, &sighandler);
signal(SIGINT, &sighandler);
signal(SIGSEGV, &sighandler);
- signal(SIGCLD, SIG_IGN);
+ signal(SIGCHLD, SIG_IGN);
syslog(LOG_INFO, "scanbuttond started");