Skip to content

Commit

Permalink
Merge pull request #333 from luvit/allow_stdin_close
Browse files Browse the repository at this point in the history
Only close stdin if its not already closed
  • Loading branch information
philips committed Aug 22, 2012
2 parents c0e5cbd + 564ab68 commit f7303db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/luvit/uv.lua
Expand Up @@ -367,7 +367,9 @@ function Process:initialize(command, args, options)
self.stderr:close()
end)
self:on('exit', function ()
self.stdin:close()
if self.stdin._closed ~= true then
self.stdin:close()
end
self:close()
end)

Expand Down

0 comments on commit f7303db

Please sign in to comment.