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

Use socketpairs for stdin #58

Open
catern opened this issue Oct 12, 2023 · 0 comments
Open

Use socketpairs for stdin #58

catern opened this issue Oct 12, 2023 · 0 comments

Comments

@catern
Copy link

catern commented Oct 12, 2023

Catching pipe errors when writing to standard input

A straightforward way to avoid this on Unix is to use a socketpair rather than a pipe for sending input to the subprocess. Still use pipes within a pipeline, of course - there, the SIGPIPE behavior is correct. But pipes are optimized for pipelines, and for other communication with a subprocess it's better to use a socketpair.

@catern catern changed the title Use socketpairs for stdinCatching pipe errors when writing to standard input - use socketpai Use socketpairs for stdin Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant