Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #8320
| Path | csiph.com!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Victor Porton <porton@narod.ru> |
| Newsgroups | comp.programming |
| Subject | What if a subprocess disconnects stdin and/or stdout? |
| Date | Mon, 22 Jan 2018 00:43:47 +0200 |
| Organization | Aioe.org NNTP Server |
| Lines | 21 |
| Message-ID | <p43532$1is6$1@gioia.aioe.org> (permalink) |
| NNTP-Posting-Host | If8ZVlbqfm2Xi3msXtX5mg.user.gioia.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="ISO-8859-1" |
| Content-Transfer-Encoding | 7Bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | KNode/4.14.10 |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com comp.programming:8320 |
Show key headers only | View raw
I am writing "Command Communication Library": https://github.com/vporton/libcomcom The most immediate purpose is to (synchronously as of the planned first release): Run an OS command with the given string written to stdin and with stdout returned (as a string) to the caller after the command finished. It is clear what to do if the child process exits. But what if the child process does NOT exit but closes stdin and/or stdout? What should I do in this case? Should I kill the process? Should I wait when it finishes? Should I return the stdout now, even despite the process has not yet finished? P.S. This libcomcom is a VERY long time should be already have been written. I wonder if I am the first person who solves this problem. -- Victor Porton - http://portonvictor.org
Back to comp.programming | Previous | Next | Find similar | Unroll thread
What if a subprocess disconnects stdin and/or stdout? Victor Porton <porton@narod.ru> - 2018-01-22 00:43 +0200
csiph-web