[ntp:questions] "ntpdate" hanging !!
Srikanth K
srikanth.k at hp.com
Wed Mar 9 05:57:17 UTC 2005
mayer at gis.net wrote:
>----- Original Message Follows -----
>
>
>>Hello
>>
>>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"
>>binary.
>>
>>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?
>>
>>
>>>Danny
>>>
>>>
>>>
>>>
>>>
>>>>Thanks in Advance,
>>>>-Srikanth K.
>>>>
>>>>
>>>>
>
>You need to either allow SIGALRM when running ntpdate or build ntpdate
>without
>SIGALRM. ntpdate is using it. ntpdate (and ntpd) weren't meant to be run
>from
>within another program like this.
>
>Danny
>
>
>
Hi Danny & Brian,
Thanks for you reply.
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.
Thanks in Advance,
-Srikanth K.
More information about the questions
mailing list