Process behavior different when spawned from single terminal


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Process behavior different when spawned from single terminal
# 1  
Old 03-03-2011
Process behavior different when spawned from single terminal

So this one just plain confuses me. I have a bunch of somewhat CPU intensive processes that all communicate using a shared memory region. Some of these programs are threaded and some also change the scheduling to FIFO or round robin. The good news is that everything works as long as I spawn every process from a different terminal (on ubuntuso think it is gnome terminal). This is cumbersome though so i wrote a script to spawn all of these different processes from one perl program (also tried sh). But the processes, even if called the same way) seem to hang. It appear to be a priority thing but nicing doesn't help. Not sure what else in scheduling should matter. Any ideas why proceses spawned from different terminals are ok but processes spawned from a single terminal are not.
# 2  
Old 03-04-2011
Do they have to run from a GUI environment, have you tried to run them from an ssh/telnet session?
# 3  
Old 03-04-2011
Can you try stracing them to see what they're doing?
# 4  
Old 03-04-2011
Not sure what running from a ssh session would do. Does that change scheduling / priority? One of my processes is a GUI so would prefer not to (although it can't hurt to try with x forwarding)

Strace sounds like a good idea though. Will do next time I get a chance
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh behavior in scripts spawned w/nohup

I have a need to run any number of identical scripts simultaneously, so I've created a driver script which reads a template script, edits these appropriately and then submits them via nohup. The spawned scripts all check to see at some point how many of their number are running and once the count... (7 Replies)
Discussion started by: safedba
7 Replies

2. UNIX for Advanced & Expert Users

Getting the process ID of the terminal in Unix/Linux

Hi, How can we get the process id of the terminal we are using? When we logged in to unix, we have an associated terminal. we can use "tty" command to get the terminal we are using like: /dev/pts/0 I want to know the process id of this terminal. Please reply as I searched a lot but I... (8 Replies)
Discussion started by: crazybisu
8 Replies

3. UNIX for Advanced & Expert Users

unix command for terminal - view sequences as a single line?

Hello, I'm looking for some code that will list sequences of files as a single line. ie, sequences of files like this: filename.1.ext filename.2.ext filename.3.ext filename.4.ext filename.5.ext filename.6.ext filename.7.ext filename.8.ext filename.9.ext filename.10.ext would... (6 Replies)
Discussion started by: kentm
6 Replies

4. Shell Programming and Scripting

Suppressing output of a spawned telnet process

Hi, I'm trying to spawn a telnet process and trying to do some actions in the remote host using expect script. I would like to know how to suppress all the output in order the user using the script should not be able to see any actions done on the remote host. I tried using the "log_user 0"... (8 Replies)
Discussion started by: arun_maffy
8 Replies

5. UNIX for Dummies Questions & Answers

Finding apache process id that is spawned by a wget

Hi, I have a situation where I am writing a programme that runs a series of long running PHP scripts that can take anything from 20 minutes to 10 hours to execute. I have a solution half implemented where I use via php exec(wget <location to command>) and get the process id back. This... (1 Reply)
Discussion started by: mrploddy
1 Replies

6. Shell Programming and Scripting

Process not attached to terminal

Hi Folks, When i try to run schedule job on Unix server am getting following errror messges in logs pic_selection @starting on Fri Feb 5 01:53:06 GMT 2010 ------------------------------------------------------------------------------- Microfocus Cobol batch run Started: Fri Feb 5... (4 Replies)
Discussion started by: bhargav20
4 Replies

7. UNIX for Dummies Questions & Answers

How can I change the behavior of the mouse in Terminal?

Hi, I hope I'm posting in the correct forum, so here goes. I would like for the mouse right/left click to work in Terminal (OSX) as it does in Putty. For instance, when I double click 'log' in file.log.gz, only the log part is highlighted (in Terminal), while in Putty the entire file name is... (0 Replies)
Discussion started by: TheChemist
0 Replies

8. UNIX for Advanced & Expert Users

Control process from different terminal (over SSH)

I pressed CTRL Z and suspended the job. then I pressed bg, The process re-started to throw output on the terminal and its not allowing me to access the prompt. its not even accepting CTRL Z. The process has been running for about 2 hours now and I want to suspend it by opening another terminal.... (3 Replies)
Discussion started by: rakeshou
3 Replies

9. UNIX for Advanced & Expert Users

how to run a process after closing the terminal

i want to execute a shell script even if the terminal is closed. how to do? (3 Replies)
Discussion started by: lakshmananindia
3 Replies

10. Shell Programming and Scripting

Is there any cmd to kill a process including its childs ( or sub processes spawned by

Dear Unix Gurus, Here is my query. If i start a script,it inturn calls many other scripts ..and most of them continue to run in parallel. Suppose,if i want to stop my script for some reason,i need to kill -9 each of the processes running.It becomes clumsy if the sub processes r more. ... (15 Replies)
Discussion started by: gvsreddy_539
15 Replies
Login or Register to Ask a Question