Ben NanoNote

Sign in or create your account | Project List | Help

Issue 97: Wrong error code when it is tried to open for reading a non existent file

Reported by Juan ComesaƱa, Oct 22, 2010

Hi,

The C function open produces a wrong error code when it is used for 
reading a non existent file. According to the man page the right 
error code for this case is ENOENT.

This bug was observed in the software image 2010-09-14.

I've attached a C file with code that allows to reproduce the bug. 

Another way is of reproducing the bug with with Python:

f = open('foo.txt', 'r')

You will get the following error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 6042416] Unknown error 6042416: 'foo.txt'

Instead of the expected one:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'foo.txt

Comment 1 by Phillip Welk, Jul 2, 2020

Get your problem,s solved related to the code error through this 
blog. This is a wondrous blog that is dealing with such activities 
which is easier to visit https://www.ukbestessay.net/ in order to 
manage the task. These are doing their best in maintaining their 
actions and to help the clients with their best.

Created: 9 years 8 months ago by Juan ComesaƱa

Updated: 13 days 18 hours ago

Status: New

Followed by: 1 person

Labels:
Type:Defect
Priority:Medium



interactive