This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Uthread problem - Pipe left open
Type: Stage:
Components: Interpreter Core Versions: Python 2.2
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: lack, loewis
Priority: normal Keywords:

Created on 2003-04-08 16:50 by lack, last changed 2022-04-10 16:08 by admin. This issue is now closed.

Messages (4)
msg15405 - (view) Author: Jim Ramsay (lack) Date: 2003-04-08 16:50
For some reason on my FreeBSD system whenever I run
python I am unable to access file descriptor 3 or 4. 
According to my system's fstat, there is a pipe there:

lack     python     36683    3* pipe cd5b2cc0 <->
cd99f9e0      0 rw
lack     python     36683    4* pipe cd99f9e0 <->
cd5b2cc0      0 rw

But I did not open this pipe, nor can I figure out
where it came from.

I also cannot close this file descriptor or use it in
any way - I recieve the error:

>>> os.close(3)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
OSError: [Errno 9] Bad file descriptor
>>>

There is some strange behaviour if I close one of the
standard descriptors first:

>>> os.close(2)
>>> os.close(3)
>>> os.close(4)
>>> 

But despite the lack of error messages, the pipe from 3
to 4 is still open.

I do not know why this happens. and am at a loss at how
to access FD#3.
msg15406 - (view) Author: Jim Ramsay (lack) Date: 2003-04-08 17:30
Logged In: YES 
user_id=185022

Update:

This seems to be linked to "uthread" support.  This pipe is
opened in uthread_init.c around line 167, and should be
closed by uthread_execve.c around line 59.

For some reason the pipe is not being closed.
msg15407 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-05-04 12:50
Logged In: YES 
user_id=21627

Neither uthread_init.c nor uthread_execve.c are part of the
Python distribution. Why do you think you have found a bug
in Python? It sounds more like a bug in FreeBSD to me.
msg15408 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-05-24 11:41
Logged In: YES 
user_id=21627

Closing because of lack of response.
History
Date User Action Args
2022-04-10 16:08:03adminsetgithub: 38275
2003-04-08 16:50:53lackcreate