Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 111801 Details for
Bug 169002
ntpd takes to long to create a pidfile after forking
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Write pidfile immediately after forking
ntpd-pidearly.patch (text/plain), 1.20 KB, created by
Roy Marples (RETIRED)
on 2007-03-02 14:30:14 UTC
(
hide
)
Description:
Write pidfile immediately after forking
Filename:
MIME Type:
Creator:
Roy Marples (RETIRED)
Created:
2007-03-02 14:30:14 UTC
Size:
1.20 KB
patch
obsolete
>diff -ur ntp-4.2.4.orig/ntpd/cmd_args.c ntp-4.2.4/ntpd/cmd_args.c >--- ntp-4.2.4.orig/ntpd/cmd_args.c 2006-12-28 12:03:26 +0000 >+++ ntp-4.2.4/ntpd/cmd_args.c 2007-03-02 14:07:49 +0000 >@@ -94,8 +94,6 @@ > if (HAVE_OPT( KEYFILE )) > getauthkeys(OPT_ARG( KEYFILE )); > >- if (HAVE_OPT( PIDFILE )) >- stats_config(STATS_PID_FILE, OPT_ARG( PIDFILE )); > > if (HAVE_OPT( QUIT )) > mode_ntpdate = TRUE; >diff -ur ntp-4.2.4/ntpd/ntpd.c /tmp/ntp-4.2.4/ntpd/ntpd.c >--- ntp-4.2.4/ntpd/ntpd.c 2006-12-28 23:02:02 +0000 >+++ /tmp/ntp-4.2.4/ntpd/ntpd.c 2007-03-02 14:09:34 +0000 >@@ -586,6 +586,7 @@ > } > #endif > >+ > #if !defined(VMS) > # ifndef NODETACH > /* >@@ -600,6 +601,9 @@ > # ifndef SYS_WINNT > # ifdef HAVE_DAEMON > daemon(0, 0); >+ /* Write the pidfile as early as possible */ >+ if (HAVE_OPT( PIDFILE )) >+ stats_config(STATS_PID_FILE, OPT_ARG( PIDFILE )); > # else /* not HAVE_DAEMON */ > if (fork()) /* HMS: What about a -1? */ > exit(0); >@@ -610,6 +614,10 @@ > int max_fd; > #endif /* not F_CLOSEM */ > >+ /* Write the pidfile as early as possible */ >+ if (HAVE_OPT( PIDFILE )) >+ stats_config(STATS_PID_FILE, OPT_ARG( PIDFILE )); >+ > #if defined(F_CLOSEM) > /* > * From 'Writing Reliable AIX Daemons,' SG24-4946-00,
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 169002
: 111801