Bug or "feature"?

Johan Fredrik Øhman johanfo at ohman.no
Mon Mar 10 16:41:40 CET 2003


take a look at this code run from python 2.2.2:

>>> import thread, os
>>> thread.start_new_thread(os.system, ("/usr/sbin/ntpdate ifi.uio.no",))

This starts a program "ntpdate" from a Python thread.  Usually this is no
problem. Ntpdate, is a simple program to adjust the clock of the system.
However, when ntpdate is started from a thread it locks up and newer exits
!!   With my limited debugging knowledge, it sems as it hangs in a "poll()"
kernel call, however, this could be misleading. (I used stacktrace -p <pid>)

So, what's happening here, and whose fault is it ?

--
Johan Fredrik Ohman






More information about the Python-list mailing list