Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 180631 Details for
Bug 257139
net-misc/dhcdbd-3.0 - /usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fixed dhcdbd-3.0-daemon.patch
dhcdbd-3.0-daemon.patch (text/plain), 1.72 KB, created by
Tom Voss
on 2009-02-01 23:44:42 UTC
(
hide
)
Description:
fixed dhcdbd-3.0-daemon.patch
Filename:
MIME Type:
Creator:
Tom Voss
Created:
2009-02-01 23:44:42 UTC
Size:
1.72 KB
patch
obsolete
>diff -ruN dhcdbd-3.0.orig/src/dhcdbd.c dhcdbd-3.0/src/dhcdbd.c >--- dhcdbd-3.0.orig/src/dhcdbd.c 2007-09-04 10:31:45.000000000 -0500 >+++ dhcdbd-3.0/src/dhcdbd.c 2007-09-04 10:35:52.000000000 -0500 >@@ -2769,9 +2769,6 @@ > char path[1024]; > int fd, l; > >- if (dhcdbd_daemonize && (daemon (0, 0) == -1)) >- return errno; >- > openlog ("dhcdbd", LOG_NDELAY | LOG_CONS, LOG_USER); > > dbus = dbus_svc_init (bus, dhcdbd_destination, dhcdbd_log, 0L); >@@ -2812,6 +2809,17 @@ > (dbus, dhcdbd_object_path, path, dhcdbd_if_subscribe, dhco)) > return (1); > >+ /* Daemonize and write the pidfile write away, to avoid races */ >+ if (dhcdbd_daemonize && (daemon (0, 0) == -1)) >+ return errno; >+ unlink (DHCDBD_PID_FILE); >+ if ((fd = open (DHCDBD_PID_FILE, O_WRONLY | O_CREAT, 0644)) == -1) >+ exit (errno); >+ l = sprintf (path, "%u", getpid ()); >+ l = write (fd, path, l); >+ fsync (fd); >+ close (fd); >+ > memset (&sa, '\0', sizeof (struct sigaction)); > sa.sa_sigaction = dhc_reaper; > sa.sa_flags = SA_SIGINFO; /* NO RESTART, NO DEFER, CLDSTOP */ >@@ -2819,13 +2827,7 @@ > dhcdbd_log ("sigaction failed: %s\n", strerror (errno)); > return (1); > } >- unlink (DHCDBD_PID_FILE); >- if ((fd = open (DHCDBD_PID_FILE, O_WRONLY | O_CREAT, 0644)) == -1) >- exit (errno); >- l = sprintf (path, "%u", getpid ()); >- l = write (fd, path, l); >- fsync (fd); >- close (fd); >+ > dhcdbd_log ("Started up."); > dbus_svc_main_loop (dbus, dhcdbd_work); > dhcdbd_debug ("Main Loop Exited.");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 257139
: 180631