perl pipes broke sometime recently
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 240
- Forks
- 60
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 1
Description
I had this working with an older version of msys2, which had kind of been piecemeal updated so I can't really say a version, but then I did a full update recently and perl pipes from another executable broke. So I did a fresh install today with no packages (except what is installed by msys2-x86_64-20240727.exe) and it is still broken.
Here is the perl:
use strict;
use warnings;
# cmd /c needed to work with msys2
my $cmdline = "cmd /c \"echo hello\"";
open(my $exe, "-|", $cmdline) || die;
while(<$exe>) {
chomp;
print "\r$_";
}
close $exe;
The hello never shows up. It works fine with strawberry perl and cygwin perl. Occasionally after hitting ctrl-c you get a The process tried to write to a nonexistent pipe. message, but it seems sporadic.
This seems related: https://github.com/msys2/MSYS2-packages/issues/2471
Thanks,
Chris
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied Perl open "-|" example in a fresh MSYS2 installation and compare its behavior with Strawberry Perl and Cygwin Perl. Trace the pipe handling around the cmd /c invocation; done means the example prints hello reliably without the nonexistent-pipe error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, perl
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100