# New Ticket Created by  Shoichi Kaji 
# Please include the string:  [perl #131940]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131940 >


(Please note that the following is available at gist too.
https://gist.github.com/skaji/b0b210304e932445890f2a28cf7f53b0 )

I found that Proc::Async.bind-stdin left a unix socket open.
Should I call some methods on Proc::Async if I use bind-stdin?

## How to reproduce this issue

The following script demonstrates this
issue.https://gist.github.com/skaji/b0b210304e932445890f2a28cf7f53b0#file-bind-stdin-test-p6

---
❯ perl6 bind-stdin-test.p6 20 >/dev/null
run 20 tests, leaves 152 files open
❯ perl6 bind-stdin-test.p6 21 >/dev/null
run 21 tests, leaves 153 files open
❯ perl6 bind-stdin-test.p6 22 >/dev/null
run 22 tests, leaves 154 files open
❯ perl6 bind-stdin-test.p6 23 >/dev/null
run 23 tests, leaves 155 files open
---

This shows everytime we call bind-stdin method, the number of open
files increases.

The output of lsof -p PID in macos is below:
---
...
moar    44821 skaji  139u    unix 0xf2addbda53e4c6b7       0t0          ->(none)
moar    44821 skaji  140u    unix 0xf2addbda53e4c077       0t0          ->(none)
moar    44821 skaji  141u    unix 0xf2addbda53e4c90f       0t0
 ->0xf2addbda53e4c77f
---
See 
https://gist.github.com/skaji/b0b210304e932445890f2a28cf7f53b0#file-zz-result-on-macos-txt

## My environment

* This is Rakudo version 2017.07-202-ge3e29c5 built on MoarVM version
2017.07-444-g88c6851
* Both macOS Sierra (10.12.6) and Ubuntu 16.04 64bit (linux 4.4.0)

Reply via email to