Artifacts Associated With Ticket 2982713fff
Ticket change [3ba8456ad9] (rid 112784) by rkanherkar on 2010-04-06 15:39:59:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I have created the script : set log [open /home/rkanherk/iona_linux/demos/OrbixSSL/securebank.BMC/cxx/testcase.log w] puts $log "Before" set rc [catch {exec date} retval] puts $log "rc=$rc retval=$retval" puts $log "After" close $log My application calls this script and in the log i get the following signal error : error waiting for process to exit: child process lost (is SIGCHLD ignored or trapped?) Investigation shows that exec function in Tcl on Linux does not work . - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "rkanherkar"
- subsystem initialized to: "69. Other"
- title initialized to: "I cannot run exec command on Linux using Tcl/Tk"
- type initialized to: "Bug"
Ticket change [92cae90235] (rid 120832) by ferrieux on 2010-04-06 23:24:05:
- icomment:
Cannot reproduce. Please give details: - Tcl version - whether you recompiled it or got it in binary form - compile/configure options if applicable - Linux distribution, kernel version - attach the output of: strace -f -tt -T -o file ./tclsh myscript.tcl - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [4adb5fcee6] (rid 126603) by rkanherkar on 2010-04-07 20:55:13:
- icomment:
Hi, I am using the 8.4 version of Tcl/Tk on Linux m/c whose details are : Linux vm-lnx-rds18 2.6.18-128.el5 #1 SMP Wed Dec 17 11:42:39 EST 2008 i686 i686 i386 GNU/Linux I have using Tcl in the binary format in which I got it.I did not compile it. If you simply try to run the script I provided then you will not get the problem.But you will face the problem when u try to run it from some different application. Like for example I am calling this Tcl script using system command in orbix application. I have attached the testcase.log and test files.Test file contains the required trace output.
- login: "rkanherkar"
- mimetype: "text/plain"
- username: "rkanherkar"
- icomment:
Add attachment "testcase.log" [a1aa7a18a0] (rid 109765) by rkanherkar on 2010-04-07 20:59:01.
Ticket change [a689c52278] (rid 98619) by rkanherkar on 2010-04-07 20:59:02:
- icomment:
File Added - 369745: testcase.log
- login: "rkanherkar"
- mimetype: "text/plain"
- username: "rkanherkar"
- icomment:
Add attachment "test.log" [f961156674] (rid 91697) by rkanherkar on 2010-04-07 20:59:44.
Ticket change [76e535d789] (rid 105664) by rkanherkar on 2010-04-07 20:59:44:
- icomment:
File Added - 369746: test.log
- login: "rkanherkar"
- mimetype: "text/plain"
- username: "rkanherkar"
- icomment:
Ticket change [104a7d7a90] (rid 94946) by dgp on 2010-04-07 21:01:38:
- icomment:
If this is a problem in a program that embeds the Tcl library, make sure that program is properly initializing Tcl. Check for calls to Tcl_FindExecutable() and Tcl_Init(). If you are not the author of the failing program, report the issue to them instead/in addition to here.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2eee5a27a0] (rid 92968) by ferrieux on 2010-04-07 21:33:25:
- icomment:
Roma, by "calling this Tcl script using system command in orbix application", I suspect you mean system("tclsh thescript.tcl"), right ? If yes, then please attach the contents of the 'file' file when prepending that line with the strace command: system("strace -f -tt -T -o file tclsh myscript.tcl") - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [7114c167ca] (rid 100611) by ferrieux on 2010-04-07 22:41:08:
- icomment:
Ah never mind, I managed to simulate the problem with just "sh": # sh $ trap "" CHLD $ tclsh % exec echo yo yo error waiting for process to exit: child process lost (is SIGCHLD ignored or trapped?) % This shows that when the parent process (sh or Orbix) manipulates the sigmask so as to block SIGCHLD, bad things happen, in _any_ software that spawns children, like Tcl or any shell. So I 'd say this is a Don't Do That case. Please report the problem to Orbix.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [47d116aa41] (rid 258420) by serhiy.storchaka on 2026-10-17 07:12:30:
- foundin changed to: "8.6.18, 9.0.5, 9.1.0"
- icomment:
Reproduced when tclsh is started with SIGCHLD ignored, as by system() from a program which ignores it, or <nowiki>env --ignore-signal=CHLD tclsh</nowiki>: the kernel reaps the children itself and waitpid() fails with ECHILD. Proposed fix in branch [/timeline?r=tclsh-inherited-sigchld|tclsh-inherited-sigchld]: Tcl_MainEx() restores the default SIGCHLD handling if it is ignored. Applications which embed Tcl keep their own setting, as Tk now keeps the signal handlers of the embedding application on macOS ([https://core.tcl-lang.org/tk/tktview/989b1ccb98|Tk 989b1ccb98]). Test exec-24.1.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"