> We'll likely go with this solution instead of downgrading Python and the 
> related libraries.

In fact I came up with another solution. I realized that since the problem was 
related to the process signal mask, instead of called ntpd directly, wrap it up 
in a C app that resets the signal mask to something that works. I have the 
following code:

           sigset_t set, oset;
           sigemptyset(&set);
           pthread_sigmask(SIG_SETMASK, &set, &oset);
           system("/usr/sbin/ntpd -g -q");
           pthread_sigmask(SIG_SETMASK, &oset, NULL);

I wrapped this up into a standalone app and call this from Python instead of 
calling ntpd directly. This solved the problem--no more hang. Thanks very much 
to Kostik Belousov for his "wild guess" that this was related to the process 
signal mask. His guess was dead on.

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to