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

Add sourceProcessWithStreams #258

Merged
merged 2 commits into from Mar 13, 2016
Merged

Conversation

@joehillen
Copy link
Contributor

joehillen commented Mar 9, 2016

Relates to #250

, (sourceStderr, closeStderr)
, cph) <- streamingProcess cp
(_, resStdout, resStderr) <-
runConcurrently $ (,,)

This comment has been minimized.

Copy link
@snoyberg

snoyberg Mar 10, 2016

Owner

Question: what behavior do we want if the provided Source or Sinks throw an exception? It may be appropriate to have an onException here that closes the streams and kills the child process. Thoughts?

This comment has been minimized.

Copy link
@joehillen

joehillen Mar 11, 2016

Author Contributor

That thought occurred to me when I saw your recent addition of withCheckedProcessCleanup.

I think it's reasonable to do that. I suppose if a user doesn't want the subprocess killed then they can catch exceptions in the Source/Sinks.

Should that also be added to sourceProcessWithConsumer? I'll assume so for now and add it to the PR.

sourceProcessWithConsumer and sourceProcessWithStreams now terminates
the process if their streams raises an exception
@joehillen

This comment has been minimized.

Copy link
Contributor Author

joehillen commented Mar 11, 2016

@snoyberg I've added the suggested exception handling.

snoyberg added a commit that referenced this pull request Mar 13, 2016
Add sourceProcessWithStreams
@snoyberg snoyberg merged commit 3227a38 into snoyberg:master Mar 13, 2016
@snoyberg

This comment has been minimized.

Copy link
Owner

snoyberg commented Mar 13, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.