[ python-Bugs-1183585 ] try to open /dev/null as directory

SourceForge.net noreply at sourceforge.net
Sun Jun 5 14:49:01 CEST 2005


Bugs item #1183585, was opened at 2005-04-15 10:56
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1183585&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.4
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Roberto A. Foglietta (robang)
Assigned to: Nobody/Anonymous (nobody)
Summary: try to open /dev/null as directory

Initial Comment:

bash-2.05b# strace python 2>&1 | grep open | grep null
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1
ENOTDIR (Not a directory) 

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

>Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-06-05 14:49

Message:
Logged In: YES 
user_id=1188172

I think this isn't Python's fault, as isandler's post shows.
I would rather look for a bug in the C lib.

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

Comment By: Ilya Sandler (isandler)
Date: 2005-05-17 07:02

Message:
Logged In: YES 
user_id=971153


2 questions though:

1. Does this cause any problems?

2. I observe exactly the same behaviour for ls! (I'm on
Debian, kernel 2.4.25)


 bagira:~> strace ls | & grep open | grep null
 open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1        
    ENOTDIR (Not a directory)

 and for du:

  bagira:~> strace du /etc | & grep open |grep null
  open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1
ENOTDIR (Not a directory)

So, I'm almost ready to say that even if it's a bug, it's
not a python's bug... (Search for /dev/null in python source
also does not find anything interesting)..




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

Comment By: Roberto A. Foglietta (robang)
Date: 2005-04-20 20:02

Message:
Logged In: YES 
user_id=36141

I downloaded the python-2.4.1 sources and compiled under
slack 10 and Mandrake 10.1 and in both case it tried to open
/dev/null as a directory.
Some debian users reported me the same behaviure.

[roberto at wsraf roberto]$ uname -ar
Linux wsraf.sad.it 2.6.8.1-24mdksmp #1 SMP Thu Jan 13
23:11:43 MST 2005 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
unknown GNU/Linux



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

Comment By: Georg Brandl (gbrandl)
Date: 2005-04-16 09:54

Message:
Logged In: YES 
user_id=849994

I don't quite understand what you're trying to tell us here.

Are you just calling Python this way and observing the
system calls? Then, what system do you use? What version?
What kernel, etc.

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

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


More information about the Python-bugs-list mailing list