diff options
| author | Omar Rizwan <omar@omar.website> | 2023-06-01 23:50:58 +0000 |
|---|---|---|
| committer | Omar Rizwan <omar@omar.website> | 2023-06-01 23:50:58 +0000 |
| commit | 564f37d6684e2ed86e707233bbd93e1537cf83a5 (patch) | |
| tree | d005a44d252834d073f049d77fe46d81f792a144 /lib | |
| parent | Fix destructors, add program code compat (diff) | |
| download | folk-564f37d6684e2ed86e707233bbd93e1537cf83a5.tar.gz folk-564f37d6684e2ed86e707233bbd93e1537cf83a5.zip | |
All tests pass
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/process.tcl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/process.tcl b/lib/process.tcl index 58f6637a..67642dfa 100644 --- a/lib/process.tcl +++ b/lib/process.tcl @@ -19,10 +19,11 @@ proc On-process {name body} { set ::Processes::${name}::this [uplevel {expr {[info exists this] ? $this : "<unknown>"}}] namespace eval ::Processes::$name { variable tclfd [file tempfile tclfile tclfile.tcl] - set body [list Evaluator::runInSerializedEnvironment $body [list]] - puts $tclfd [join [list $::processPrelude $body] "\n"]; close $tclfd - # TODO: send it the serialized environment + set lambda [list {} $body] + set run [list Evaluator::runInSerializedEnvironment $lambda [list]] + puts $tclfd [join [list $::processPrelude $run] "\n"]; close $tclfd + variable stdio [open "|tclsh8.6 $tclfile 2>@1" w+] variable pid [pid $stdio] |
