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

SourceForge.net noreply at sourceforge.net
Tue May 17 07:02:07 CEST 2005


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

Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
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: Ilya Sandler (isandler)
Date: 2005-05-16 22: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 11: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 00: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