Overview
| Artifact ID: | e54f23497f7b36e3517823fcb53d22647c8a6a73 |
|---|---|
| Ticket: | 2647951fffffffffffffffffffffffffffffffff
Error in exec ends stdin |
| User & Date: | eugene_cdn on 2009-02-28 06:56:26 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Tcl version: 8.4+ OS: Linux Red Hat 4, 5 Maybe, it is a Linux bug, but it appeared in Tcl's stdin handling. I got the problem in C, but I created a Tcl script that fails the same way. If you execute a certain command though system()/exec which fails, stdin stream does not provide any more input except already buffered in C code. My Tcl script is more that 8K long because I initially got the problem on the very next byte after 8K, but attached test fails a bit earlier. Important: file must be redirected to stdin: > tclsh <xxx.tcl Read(0) just returns 0 as if it is the end of pipe/socket. If you specify file name as an argument, the script works. I cannot classify the problem. Just weird. Stdin stays open, /proc/pid/fd shows it, but 0 handle is damaged. Fork/clone is doing something bad to to the parent's stdin. Any help is appreciated. I cannot depend on any developer who can call system() and break stdin. Yes, I know that such redirection seem to make no sense, but it does; it is just a simplified version.
- foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "eugene_cdn"
- subsystem changed to: "None"
- title changed to: "Error in exec ends stdin"
- type changed to: "Bug"