New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
segfault if redirecting directory #39883
Comments
If redirecting directory, python crashes. $ uname -a
SunOS xxxxx 5.8 Generic_108528-18 sun4u sparc
SUNW,Sun-Blade-1000
$ python
Python 2.3.2 (#1, Oct 9 2003, 18:59:04)
[GCC 2.95.3 20010315 (release)] on sunos5
Type "help", "copyright", "credits" or "license" for
more information.
>>> ^D
$ mkdir foo
$ ls -F
foo/
$ python < foo
Segmentation Fault -Inyeol Lee |
Logged In: YES I did some more test among different versions; |
Logged In: YES Win XP SP 1 - C:\Python24>python < Lib |
Logged In: YES Python's C main function assumes stdin, stdout and stderr A little experimentation on a Linux box should establish A sanity check on stdin should then be possible near the |
Logged In: YES I doubt if libc checks whether the input is a directory; I think you probably need something along the lines of |
Logged In: YES Here is another failure, which might have the same root cause: $ python /tmp
$ echo $?
0 I'd expect this to give an error. |
Logged In: YES I fixed this problem and also added a warning when passing a Checked in as:
|
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: