Posted to tcl by cgm at Wed Aug 19 10:57:16 GMT 2026view pretty
constructor {job_ commandline} {
set job $job_
pipe errout errin
#pipe in_out in_in
pipe out_out out_in
fconfigure $errout -blocking false
fileevent $errout readable [mymethod read_err]
dput "RUNNING '$commandline'"
set in_in [open "| >@ $out_in 2>@ $errin $commandline" w]
set pids [pid $in_in]
dput "PIDS '$pids'"
foreach pid $pids { set pid_handlers($pid) $self }
fconfigure $out_out -blocking false
fileevent $out_out readable [mymethod read_out]
close $errin
close $out_in
#close $in_out
set comstat running
}