Artifacts Associated With Ticket 437489ffffffffff
Ticket change [af488bdaeb] (rid 97784) by dgp on 2001-06-29 22:51:06:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The attached file, mywish.c, creates a customized "wish" program on Unix that makes use of the Tk console developed for Windows. The routines that make this possible, Tk_InitConsoleChannels() and Tk_CreateConsoleWindow() are public. Create a program from the attached file with gcc like so: gcc -o mywish mywish.cc -ltk8.3 -ltcl8.3 Then start ./mywish and up pops the console. So far so good. Enter in the console: % exec xeyes &;# or whatever is available forked process couldn't set up input/output: bad file number % set errorCode POSIX EBADF {bad file number} I tracked down the problem in unix/tclUnixPipe.c and will attach a one-liner patch that fixes it. - foundin initialized to: "obsolete: 8.3.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "27. Channel Types"
- title initialized to: "Tk console breaks [exec]"
- type initialized to: "Bug"
Ticket change [793a0c587a] (rid 90092) by dgp on 2001-06-30 05:51:07:
- icomment:
File Added - 7946: mywish.c
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "mywish.c" [add96b3802] (rid 101529) by dgp on 2001-06-30 05:51:07.
Add attachment "pipe.patch" [57ec2726c5] (rid 117714) by dgp on 2001-06-30 05:52:45.
Ticket change [c761be4089] (rid 121920) by dgp on 2001-06-30 05:52:45:
- icomment:
File Added - 7947: pipe.patch Logged In: YES user_id=80530 Here's the patch...
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [1bf291e645] (rid 123239) by dgp on 2001-07-06 02:27:18:
- icomment:
Logged In: YES user_id=80530 Note that after this fix, the child process can start up, but it will have no standard channels. (File descriptors 0, 1, 2 will be closed). Unless the child process handles that possibility, there can still be trouble. Note especially that if the child process includes a Tcl interp, the first 3 channels created will "become" stdin, stdout and stderr. Unless that is controlled carefully, it will probably lead to unpredictable behavior. Can anyone explain why Tcl_CreateChannel does that?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [f820b3208d] (rid 91485) by andreas_kupries on 2001-08-23 05:57:14:
- icomment:
Logged In: YES user_id=75003 It allows you to close stdout, open a file (or socket) and thus have that file/socket as the new stdout of the application.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [9c1e953554] (rid 111227) by dgp on 2001-12-08 00:06:28:
- assignee changed to: "andreas_kupries"
Ticket change [7103bab1bf] (rid 100594) by andreas_kupries on 2001-12-11 09:43:43:
- closedate changed to: "2001-12-11T02:43:43"
- closer changed to: "andreas_kupries"
- icomment:
Logged In: YES user_id=75003 Patch committed to head.
- login: "andreas_kupries"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "andreas_kupries"