I used Xterm -e command to run six programs in the background in six X terminals in my shell script. When I used PS command, I can see 6 Xterm process running in the background but I can't see the programs. If I used Top command, I can see the programs. Is there a clean way to kill all the x terminals and the programs?
Here is the xterminal command in my script:
xterm -e "script -c \"program\" outputfile" &
Another problem is I try to capture the output of the program to a file, but for some reason I can only capture part of it. If I get rid of the & at the end, I can capture all the output but I can't get control back since the program is running as a server, which means it doesn't end unless I kill the server.