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

File numbers not closed on some operating systems [rt.cpan.org #130491] #14

Open
toddr opened this issue Jan 19, 2020 · 0 comments
Open

Comments

@toddr
Copy link
Member

toddr commented Jan 19, 2020

Migrated from rt.cpan.org#130491 (status was 'new')

Requestors:

From [email protected] on 2019-09-11 07:07:08
:

IPC::Run is has a broken test in t/pty.t because IO::Pty objects are not closing all of their file handles when they are destroyed.

https://github.com/toddr/IPC-Run/issues/130

On Fedora 29 and Redhat 8, file handle 4 doesn't reliably close. I've seen it close occasionally so this failure isn't even consistent.

$>perl -MIO::Pty -MIPC::Run::Debug -wE'print __FILE__ . " " . __LINE__ . "  " . IPC::Run::Debug::_map_fds() . "\n";my $h = IO::Pty->new; print __FILE__ . " " . __LINE__ . "  " . IPC::Run::Debug::_map_fds() . "\n";undef $h; print __FILE__ . " " . __LINE__ . "  " . IPC::Run::Debug::_map_fds() . "\n";'
-e 1  012---------
-e 1  012345------
-e 1  012-4-------

From [email protected] on 2019-09-11 07:08:51
:

See also https://github.com/toddr/IPC-Run/issues/56

From [email protected] on 2019-09-11 07:16:34
:

The file handle seems to get re-used so this isn't a incrementing leak.

$>perl -MIO::Pty -MIPC::Run::Debug -wE'sub loop { print __FILE__ . " " . __LINE__ . "  " . IPC::Run::Debug::_map_fds() . "\n";my $h = IO::Pty->new; print __FILE__ . " " . __LINE__ . "  " . IPC::Run::Debug::_map_fds() . "\n";undef $h; print __FILE__ . " " . __LINE__ . "  " . IPC::Run::Debug::_map_fds() . "\n"; } loop() for(1..10);'
-e 1  012---------
-e 1  012345------
-e 1  012-4-------
-e 1  012-4-------
-e 1  012345------
-e 1  012-4-------
-e 1  012-4-------
-e 1  012345------
-e 1  012-4-------
-e 1  012-4-------
-e 1  012345------
-e 1  012-4-------
-e 1  012-4-------
-e 1  012345------
-e 1  012-4-------
-e 1  012-4-------
-e 1  012345------
-e 1  012-4-------
-e 1  012-4-------
-e 1  012345------
-e 1  012-4-------
-e 1  012-4-------
-e 1  012345------
-e 1  012-4-------
-e 1  012-4-------
-e 1  012345------
-e 1  012-4-------
-e 1  012-4-------
-e 1  012345------
-e 1  012-4-------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant