Skip to content

Instantly share code, notes, and snippets.

@richo
Created November 16, 2012 04:00
Show Gist options
  • Save richo/4083921 to your computer and use it in GitHub Desktop.
Save richo/4083921 to your computer and use it in GitHub Desktop.
diff --git a/lib/babushka/shell.rb b/lib/babushka/shell.rb
index f8f7b76..af64d62 100644
--- a/lib/babushka/shell.rb
+++ b/lib/babushka/shell.rb
@@ -81,7 +81,11 @@ module Babushka
pipe_in.close
write_fds.delete(pipe_in)
else
- pipe_in.write(buf)
+ begin
+ pipe_in.write(buf)
+ rescue Errno::EPIPE
+ write_fds = []
+ end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment