Ticket UUID: | 2982713 | |||
Title: | I cannot run exec command on Linux using Tcl/Tk | |||
Type: | Bug | Version: | None | |
Submitter: | rkanherkar | Created on: | 2010-04-06 15:39:59 | |
Subsystem: | 69. Other | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | ||
Status: | Open | Last Modified: | 2010-04-07 22:41:08 | |
Resolution: | None | Closed By: | ||
Closed on: | ||||
Description: |
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 . | |||
User Comments: |
ferrieux added on 2010-04-07 22:41:08:
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. ferrieux added on 2010-04-07 21:33:25: 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") dgp added on 2010-04-07 21:01:38: 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. rkanherkar added on 2010-04-07 20:59:44: File Added - 369746: test.log rkanherkar added on 2010-04-07 20:59:02: File Added - 369745: testcase.log rkanherkar added on 2010-04-07 20:55:13: 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. ferrieux added on 2010-04-06 23:24:05: 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 |