Overview
| Artifact ID: | c8efc59ba8d6291996a91c7f2f7ed4aec6ff08f7 |
|---|---|
| Ticket: | 412504ffffffffffffffffffffffffffffffffff
fileevent readable translation mode auto |
| User & Date: | andreas_kupries on 2001-04-10 01:25:53 |
Changes
- icomment:
Logged In: YES user_id=75003 All new files mentioned below are part of the uploaded archive "fet-notes.tar.gz". When trying out the example I noted that for me "fileeventthing-sh" did _not_ generate lines having \r (CR) as line separator. See file "shout" (SHell OUT) for an example, looked not with an editor, but 'od -c' to get a unimpaired look into the file. Because of this I wrote "numbergen", a tcl script doing the same. Its output is "shut.ng" and does contain the correct line separators, i.e. CR (side note: My emacs went into Mac submode! when displaying the file). The script "fet" is "fileeventthing-tclsh" modified to use "numbergen" for the spawned command pipe. It was also modified to display the times the fileevent was fired before printing the received line. Now testing the interaction all lines came in 1-second intervals, including the line for number 10. After that line was a 21-second wait for EOF, as expected. See file "fet.out" for a log. So, I was unable to reproduce the error on my system: % parray tcl_platform tcl_platform(byteOrder) = littleEndian tcl_platform(machine) = i586 tcl_platform(os) = Linux tcl_platform(osVersion) = 2.2.17 tcl_platform(platform) = unix tcl_platform(user) = tcl % info tclversion 8.3 % info patchlevel 8.3.1 Griff, please use the new scripts to check this out on your system too. Note, "numbergen" does [fconfigure stdout -buffering line -translation cr] to get the right line-separators and to avoid explicit flushing. This could be a difference with the original application too. IOW the original application / echo script may buffer the last line longer than is intended. The C library often acts differently, especially with regard to buffering output, when it detects that it talks to a pipe and not a pty (= terminal like xterm). This could be another reason for the problem you experience.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"