gopher-lua
gopher-lua copied to clipboard
Fix the popen with "w" by closing the writer (otherwise wait never terminates)
trafficstars
Changes proposed in this pull request:
- When closing a
lFileProcessclose the writer before callingWait - Normalize the stdout closing to also use casting to
.(io.Closer) - Move the close of stdout after the Wait - data could still be written before the process finishes.
- Add a test for read and write
@yuin any chance you could merge this fix to the close method so that processes that are opened to be sent information (on their stdin) can be awaited too?