Opened 20 months ago

#14871 new bug

With process substitiution, ghc didn't read filedescriptor.

Reported by: octaltree Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.2.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

I ran ghc with process substitution as filename but ghc couldn't read the filedescriptor. I ran this script with bash and zsh, then I got the error.

#!/bin/sh
H='''
main = putStrLn "Hello, World!
'''
P='''
print("Hello, World!")
'''
R='''
puts "Hello, World!"
'''

stack ghc -- --version
bash --version
zsh --version
cat --version
python --version
ruby --version
echo '-----------------------'
cat <(echo -n "$H")
echo '-----------------------'
stack ghc <(echo -n "$H")
echo '-----------------------'
python <(echo -n "$P")
ruby <(echo -n "$R")
The Glorious Glasgow Haskell Compilation System, version 8.2.2
GNU bash, バージョン 4.4.19(1)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
ライセンス GPLv3+: GNU GPL バージョン 3 またはそれ以降 <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
zsh 5.4.2 (x86_64-unknown-linux-gnu)
cat (GNU coreutils) 8.29
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

作者 Torbjorn Granlund および Richard M. Stallman。
Python 3.6.4
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
-----------------------

main = putStrLn "Hello, World!
-----------------------
target ‘/dev/fd/63’ is not a module name or a source file
-----------------------
Hello, World!
/dev/fd/63: No such file or directory @ realpath_rec - /proc/4024/fd/pipe:[1855404] (Errno::ENOENT)

I already reported to ruby.

Change History (0)

Note: See TracTickets for help on using tickets.