[Python-bugs-list] [ python-Bugs-426960 ] fork problem with Python-2.1

noreply@sourceforge.net noreply@sourceforge.net
Tue, 29 May 2001 14:55:01 -0700


Bugs item #426960, was updated on 2001-05-24 09:00
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=426960&group_id=5470

Category: Extension Modules
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Armin Steinhoff (arminsteinhoff)
Assigned to: Nobody/Anonymous (nobody)
Summary: fork problem with Python-2.1

Initial Comment:

I have a strange problem with Python2.1 running QNX6.
The test script test_fork1.py returns with following result:

# python -t test_fork1.py
/* sys.path include in script ... */
['', '/usr/local/lib/python2.1', '/usr/local/lib/python2.1/Lib/lib-tk',
'/usr/local/lib/python2.1/lib/python2.1', '/usr/local/
lib/python2.1/lib/python2.1/plat-qnx6',
'/usr/local/lib/python2.1/lib/python2.1/lib-tk',
'/usr/local/lib/python2.1/lib/python2 .1/lib-dynload']
Traceback (most recent call last):
  File "test_fork1.py", line 76, in ?
    main()
  File "test_fork1.py", line 55, in main
    cpid = os.fork()
OSError: [Errno 89] Function not implemented

----------------------------------------------------------------------
That's very strange ... because it works in the interactive mode =:-(
----------------------------------------------------------------------

# python
Python 2.1 (#16, May 11 2001, 18:37:57)
[GCC 2.95.2 19991024 (release)] on qnx6
Type "copyright", "credits" or "license" for more information.
>>> import sys, os
>>>sys.path
['', '/usr/local/lib/python2.1', '/usr/local/lib/python2.1/Lib/lib-tk',
'/usr/local/lib/python2.1/lib/python2.1',
'/usr/local/lib/python2.1/lib/python2.1/plat-qnx6',
'/usr/local/lib/python2.1/lib/python2.1/lib-tk',
'/usr/local/lib/python2.1/lib/python2 .1/lib-dynload']
>>>
>>> os.fork
<built-in function fork>
>>> os.fork()
6512990

Any ideas where to look?

Armin



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

>Comment By: Jeremy Hylton (jhylton)
Date: 2001-05-29 14:55

Message:
Logged In: YES 
user_id=31392

test_fork1 tests the behavior of threads across a fork (why
this is important is not entirely clear to me).  Perhaps the
problem you see is that fork() behaves differently in the
presence of threads.

Did you try this?
>>> import test.test_fork1

Is os.name == "posix" on your system?  Or does fork() come
from somewhere other than the posix module?


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

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