Skip to content
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

run() doesn't plumb filehandles together, but instead copies data #6345

Closed
p6rt opened this issue Jun 14, 2017 · 4 comments
Closed

run() doesn't plumb filehandles together, but instead copies data #6345

p6rt opened this issue Jun 14, 2017 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 14, 2017

Migrated from rt.perl.org#131576 (status was 'resolved')

Searchable as RT131576$

@p6rt
Copy link
Author

p6rt commented Jun 14, 2017

From @geekosaur

Found by dogbert17 while trying to debug spurious spelling errors in
aspell.t in the docs repo.

my $proc = run(<aspell -a --ignore-case --extra-dicts=./xt/aspell.pws>,
:in($fixer.out), :out);

This should arrange to fcntl(fd, F_DUPFD, 0) in the subprocess that will
exec aspell, where fd is the file descriptor backing $fixer.out, but
instead it copies whatever data is currently available from that handle.
(This copying is visible in an strace.)

IRC discussion​: https://irclog.perlgeek.de/perl6-dev/2017-06-14#i_14733641

--
brandon s allbery kf8nh sine nomine associates
allbery.b@​gmail.com ballbery@​sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

@p6rt
Copy link
Author

p6rt commented Jun 27, 2017

From @jnthn

On Wed, 14 Jun 2017 13​:57​:14 -0700, allbery.b@​gmail.com wrote​:

Found by dogbert17 while trying to debug spurious spelling errors in
aspell.t in the docs repo.

my $proc = run(<aspell -a --ignore-case --extra-dicts=./xt/aspell.pws>,
:in($fixer.out), :out);

This should arrange to fcntl(fd, F_DUPFD, 0) in the subprocess that will
exec aspell, where fd is the file descriptor backing $fixer.out, but
instead it copies whatever data is currently available from that handle.
(This copying is visible in an strace.)

IRC discussion​: https://irclog.perlgeek.de/perl6-dev/2017-06-14#i_14733641

The implementation has been changed to arrange for this to be done at the descriptor level. This is done in Proc, and Proc​::Async is a couple of small tweaks away from having a way to do it also (which it has never had before). Since this issue relates to the situation in Proc, marking it as resolved.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jun 27, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt closed this as completed Jun 27, 2017
@p6rt
Copy link
Author

p6rt commented Jun 27, 2017

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant