Last updated on 1 December 1995
This page lists the known bugs as well as some useful, undocumented features.
-noPipeError
for the exec
command
exec
can be used to create a pipeline. For example,
exec last rgray | head -1pipes the output of the
last
command through the head
command. The problem with this example is that the head
command finishes before the last
command (last
produces hundreds of lines of output but head
just echoes the first line and quits immediately). The last
command then exits abnormally because it is trying to write to a disconnected pipe. exec
fails with the error message
child killed: write on pipe with no readers
You can force exec
to ignore this pipe error with the -noPipeError
flag. The example should be rewritten as
exec -noPipeError last rgray | head -1so that it no longer fails.
while {1} { # { puts HELLO }This is a long-standing problem with Tcl itself and will not be fixed as part of the Agent Tcl project. Do not use curly brackets inside a comment and you will be all set.
gets
, puts
and read
can be interrupted unexpectedly
gets
, puts
or read
command, the command will fail with the error message
Interrupted system calland will set the
errorCode
variable to
POSIX EINTR ...This problem is being fixed. A temporary workaround is to reissue the command if the
errorCode
variable starts with "POSIX EINTR". For example:
# loop until there is no error while {[catch {gets $fd} line]} { # an error has occured so see if errorCode starts with POSIX EINTR # loop around and issue the command again if errorCode starts with POSIX EINTR # otherwise some other error has occurred and we must handle it if {![string match "POSIX EINTR*" $errorCode]} { # handle other errors here } } # now the next line in the file is in the variable "line"This code fragment can be placed inside a procedure so that you do not have to type it over and over. Note that you do not need to worry about interrupts unless the agent is currently registered with a server, i.e., you only need to check for POSIX EINTR inside an
agent_begin/agent_end
pair.
agent_jump
or agent_fork
. For example, the procedure
proc run_around machines { upvar #0 env(DISPLAY) display set list "" foreach m $machines { agent_jump $m append list "The current display is $display.\n" } }will fail with the error message
can't read "display": no such variableThe following procedure, however, will work correctly.
proc run_around machines { set list "" foreach m $machines { agent_jump $m upvar #0 env(DISPLAY) display append list "The current display is $display.\n" } }This problem is being fixed.
The D'Agents Project ended in approximately 2003. The software, and this web site, is no longer maintained. For questions please contact David Kotz.