Skip to content
Tcl Source Code History Of Ticket 2982713fff
Login

History Of Ticket 2982713fff

Artifacts Associated With Ticket 2982713fff

  1. Ticket change [3ba8456ad9] (rid 112784) by rkanherkar on 2010-04-06 15:39:59:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. 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 .
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "rkanherkar"
    10. subsystem initialized to: "69. Other"
    11. title initialized to: "I cannot run exec command on Linux using Tcl/Tk"
    12. type initialized to: "Bug"
  2. Ticket change [92cae90235] (rid 120832) by ferrieux on 2010-04-06 23:24:05:

    1. 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
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  3. Ticket change [4adb5fcee6] (rid 126603) by rkanherkar on 2010-04-07 20:55:13:

    1. 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.
      
      
    2. login: "rkanherkar"
    3. mimetype: "text/plain"
    4. username: "rkanherkar"
  4. Add attachment "testcase.log" [a1aa7a18a0] (rid 109765) by rkanherkar on 2010-04-07 20:59:01.

  5. Ticket change [a689c52278] (rid 98619) by rkanherkar on 2010-04-07 20:59:02:

    1. icomment:
      
      
      File Added - 369745: testcase.log
      
      
      
    2. login: "rkanherkar"
    3. mimetype: "text/plain"
    4. username: "rkanherkar"
  6. Add attachment "test.log" [f961156674] (rid 91697) by rkanherkar on 2010-04-07 20:59:44.

  7. Ticket change [76e535d789] (rid 105664) by rkanherkar on 2010-04-07 20:59:44:

    1. icomment:
      
      
      File Added - 369746: test.log
      
      
      
    2. login: "rkanherkar"
    3. mimetype: "text/plain"
    4. username: "rkanherkar"
  8. Ticket change [104a7d7a90] (rid 94946) by dgp on 2010-04-07 21:01:38:

    1. 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.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [2eee5a27a0] (rid 92968) by ferrieux on 2010-04-07 21:33:25:

    1. 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")
      
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  10. Ticket change [7114c167ca] (rid 100611) by ferrieux on 2010-04-07 22:41:08:

    1. 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.
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  11. Ticket change [47d116aa41] (rid 258420) by serhiy.storchaka on 2026-10-17 07:12:30:

    1. foundin changed to: "8.6.18, 9.0.5, 9.1.0"
    2. 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.
      
    3. login: "serhiy.storchaka"
    4. mimetype: "text/x-fossil-wiki"