gSystem->Exec and background processes

From: Diego Faso <faso_at_to.infn.it>
Date: Fri, 8 Jul 2005 19:30:16 +0200 (MET DST)


Hi, I'm trying to upgrade my code to root-4.04/02 on
"Scientific Linux CERN Release 3.0.5 (SL)".
"gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-52)"

I found a problem while trying to run another root process with the command "gSystem->Exec".
I attach a simple macro (dummyloop.C) as an example:

[my_shell]$ root
root [0] gSystem->Exec("root \"dummyloop.C\"&")

The process starts, but it is immediately killed: here is the output of the "ps ux | grep root" command:

user 23011  0.0  0.1  3468 1264  pts/6  S 19:17 0:00 root
user 23012  3.0  2.4 45000 24988 pts/6  S 19:17 0:00 /usr/local/root/bin/root.exe -splash
user 23019  1.0  0.1  3464 1256  pts/6  S 19:17 0:00 root -q dummyloop.C
user 23020 22.0  0.0     0    0  pts/6  Z 19:17 0:00 [root.exe <defunct>]

This does not happen if I run the process using the command (without the
"&"):

root [0] gSystem->Exec("root \"dummyloop.C\"")

Anyway I need to use the "&" in order to keep on working.

I did not find the problem in root-3.10/02. Is there any way to do this in root-4.04?

Thanks in advance.
Diego

Received on Fri Jul 08 2005 - 19:35:58 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:10 MET