madhuneal / ppss

Automatically exported from code.google.com/p/ppss
0 stars 0 forks source link

Processes launched are not killed when I kill ppss.sh #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

[psarkar@teentaal ppssTrial]$ cat largeLoop.sh 
#!/bin/bash

N=0
PN=$BASHPID
while (( $N < 1000 )); do
   N=$(( $N + 1 ));
   echo ${PN}_${N};
   sleep 1;
done

[psarkar@teentaal ppssTrial]$ head -5 joblistNumbered.txt 
/tmp/ppssTrial/largeLoop.sh 1
/tmp/ppssTrial/largeLoop.sh 2
/tmp/ppssTrial/largeLoop.sh 3
/tmp/ppssTrial/largeLoop.sh 4
/tmp/ppssTrial/largeLoop.sh 5
[psarkar@teentaal ppssTrial]$ wc -l joblistNumbered.txt 
170 joblistNumbered.txt
[psarkar@teentaal ppssTrial]$ \rm -r ppss/
[psarkar@teentaal ppssTrial]$ ps | grep largeLoop
[psarkar@teentaal ppssTrial]$ 
[psarkar@teentaal ppssTrial]$ ppss.sh -f joblistNumbered.txt -c 'sh $ITEM'
Dec 09 10:14:20:  =========================================================
Dec 09 10:14:20:                         |P|P|S|S|                         
Dec 09 10:14:20:  Distributed Parallel Processing Shell Script version 2.41
Dec 09 10:14:20:  =========================================================
Dec 09 10:14:20:  Hostname:     teentaal
Dec 09 10:14:20:  ---------------------------------------------------------
Dec 09 10:14:20:  CPU: Intel(R) Xeon(TM) CPU 3.20GHz
Dec 09 10:14:20:  Found 8 logic processors.
Dec 09 10:14:20:  Starting 8 parallel workers.
Dec 09 10:14:20:  ---------------------------------------------------------
^C[psarkar@teentaal ppssTrial]$ Dec 09 10:14:34:  Finished. Consult
./ppss/job_log for job output.

[psarkar@teentaal ppssTrial]$ ps a | grep largeLoop
 5766 pts/2    S      0:00 sh /tmp/ppssTrial/largeLoop.sh 1
 5821 pts/2    S      0:00 sh /tmp/ppssTrial/largeLoop.sh 2
 5852 pts/2    S      0:00 sh /tmp/ppssTrial/largeLoop.sh 3
 5887 pts/2    S      0:00 sh /tmp/ppssTrial/largeLoop.sh 4
 5922 pts/2    S      0:00 sh /tmp/ppssTrial/largeLoop.sh 5
 5967 pts/2    S      0:00 sh /tmp/ppssTrial/largeLoop.sh 6
 6005 pts/2    S      0:00 sh /tmp/ppssTrial/largeLoop.sh 7
 6027 pts/2    S      0:00 sh /tmp/ppssTrial/largeLoop.sh 8
 6417 pts/2    S+     0:00 grep largeLoop
[psarkar@teentaal ppssTrial]$ 

What is the expected output? What do you see instead?

The above shows the bash-shell interactions. As you can see,
even after the ppss.sh process has stopped with a Ctrl-C, the 8
processes launched are still running.

What version of the product are you using? On what operating system?
  . ppss version 2.4.1 on Fedora 11, intel Xeon quad core w/ hyperthreading

Please provide any additional information below.

Original issue reported on code.google.com by sarkarpr...@gmail.com on 9 Dec 2009 at 6:21

GoogleCodeExporter commented 9 years ago
Thanx for your input, this must be fixed.

Original comment by Louwrentius on 13 Dec 2009 at 8:47

GoogleCodeExporter commented 9 years ago
In the upcoming version of PPSS this will be fixed. After some work I found a
solution to make sure that all children are killed when PPSS itself is killed 
using
ctrl-c. 

The downside is some cosmetic issues, however, everything is killed properly.

Original comment by Louwrentius on 17 Dec 2009 at 1:45