[ntp:questions] "ntpdate" hanging !!

Brian Inglis Brian.Inglis at SystematicSW.Invalid
Wed Mar 9 06:23:41 UTC 2005

ffOn Wed, 09 Mar 2005 11:27:17 +0530 in comp.protocols.time.ntp,
Srikanth K <srikanth.k at hp.com> wrote:

>mayer at gis.net wrote:

>>>Actually i am running a big application in hp-ux 11.11 and the program
>>>which i sent in my previous mail is just a simulation of the problem
>>>in  my application. Actually, the application tries to block SIGALRM
>>>signal  and run "ntpdate" binary by calling "system" library call. In
>>>the actual  scenario,  the parent program blocks the SIGALRM signal
>>>and the "system"  function calls fork/vfork and execs the "ntpdate"
>>>Eventually, the child process ( in this case: the ntpdate program )
>>>has  SIGALRM set in its signal mask. Therefore, SIGALRM is blocked for
>>>the  ntpdate program also.
>>>The following is the sytem call trace for the sample program:
>>>>>Is it a bug in "ntpdate" binary? If so, is there any fix available
>>>for >>it?
>>>>No idea. Where is it hanging? Have you tried this outside your
>>>program? >What's the purpose of the program? Have you run ntpdate
>>>under the >debugger?

>>You need to either allow SIGALRM when running ntpdate or build ntpdate
>>SIGALRM. ntpdate is using it. ntpdate (and ntpd) weren't meant to be run
>>within another program like this.

>I have some more concerns on ntpdate behavior. Kindly comment on it:
>When ntpdate is using SIGALRM,  dont you think it should make sure that 
>SIGALRM is not blocked.
>In fact "all the signals" which ntpdate uses should not be blocked. 
>Please comment on this.
>If i change the ntpdate source code in such a way that, all the signals 
>which ntpdate uses are being manually unblocked at startup up.
>For eg.
>Since ntpdate uses SIGALRM, i shall do the necessary source code change 
>to unblock the SIGALRM in the main function of ntpdate program.
>How far is the above practice legible.

AFAIK ntpdate is deprecated, unsupported, obsolete, about to
disappear, as dead as a Norwegian Blue parrot. 

Try again with ntpd -gq. 

Thanks. Take care, Brian Inglis 	Calgary, Alberta, Canada

Brian.Inglis at CSi.com 	(Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca)
    fake address		use address above to reply

More information about the questions mailing list