[Python-bugs-list] [ python-Bugs-701836 ] Thread running (os.system or popen#)

SourceForge.net noreply@sourceforge.net
Tue, 11 Mar 2003 13:55:24 -0800


Bugs item #701836, was opened at 2003-03-11 22:46
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=701836&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Johan Fredrik Öhman (johanfo)
Assigned to: Nobody/Anonymous (nobody)
>Summary: Thread running (os.system or popen#)

Initial Comment:
Bottom line: Some programs may lock up when 
spawned from a thread.


>>> 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>)



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=701836&group_id=5470