gpt4 book ai didi

tcl - 为什么 "exec"在此代码中给出 "child exited abnormally"?

转载 作者:行者123 更新时间:2023-12-04 20:53:42 25 4
gpt4 key购买 nike

我在 tcl 中运行这段代码:-

set version [exec grep "INTERNAL VERSION:" mojave.log | sed -n -e "s/INTERNAL VERSION: //g" > xor.diff]

set p [exec diff ../log.warning.diff ../log.warning.gold >> xor.diff ]

对于最后一行,它在做了一些差异之后给出了以下错误:-

> RULE-311 WARNING: Gdsii layer number 85 datatype 0 has already been defined
> TCL-11 WARNING: Command "check quartz drc" is overridden, Quality Of
> TCL-11 WARNING: Command "delete marker quartz" is overridden, Quality Of
> TCL-11 WARNING: Command "import marker quartz" is overridden, Quality Of
> TCL-11 WARNING: Command "mojave! run filter log" is overridden, Quality Of
> TCL-11 WARNING: Command "run quartz gui" is overridden, Quality Of Results
> TCL-11 WARNING: Command "ui! mojave draw rectangle" is overridden, Quality
> TCL-11 WARNING: Command "ui! mojave set_context" is overridden, Quality Of
> TCL-12 WARNING: Overridden command "mojave! run filter log" is used,
child process exited abnormally
while executing
"exec diff ../log.warning.diff ../log.warning.gold 2> xor.diff "
invoked from within
"set p [exec diff ../log.warning.diff ../log.warning.gold 2> xor.diff ]"
(file "test.tcl" line 4)
invoked from within
"source test.tcl"

而且它没有在“xor.diff”文件中写入任何内容。

最佳答案

exec 如果命令返回非零值或向 stderr 发送任何内容,则返回错误。在 http://wiki.tcl.tk/exec 上有关于将 catchexec 一起使用的非常详尽的讨论。

关于tcl - 为什么 "exec"在此代码中给出 "child exited abnormally"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6540470/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com