[Crash-utility] a strange thing

Yang Zhiguo yzgcsu at cn.fujitsu.com
Mon Apr 28 08:15:53 UTC 2008


hi, all

When i used crash in a bash script file, a strange thing happened.

step 1:
I created a bash script file: test.sh and put the following line to the 
file.
crash -i inputfile > stdout

[root at rhel51rc2 gid]# echo "crash -i inputfile > stdout" > test.sh

step 2:
I ran the bash script file.
But i forgot to create the inputfile, so the tesh.sh process hanguped.

[root at rhel51rc2 gid]# chmod 777 test.sh
[root at rhel51rc2 gid]# ./test.sh


step 3:
I killed the process in another terminal.

[root at rhel51rc2 gid]# ps aux | grep crash
root      2290  1.3  2.6 156064 89648 pts/3    S+   16:53   0:03 crash 
-i inputfile
root      2310  0.0  0.0  61280  1792 pts/4    S+   16:56   0:00 grep crash
[root at rhel51rc2 gid]# kill -9 2290
[root at rhel51rc2 gid]#

step 4:
I continued to use the first terminal. The strange thing happend, that I 
could not see
the command(ex. ls) I inputed, but when I pressed Enter, It was 
executed. what's wrong?

[root at rhel51rc2 gid]# ./test.sh
./test.sh: line 1:  2290 Killed                  crash -i inputfile >stdout
[root at rhel51rc2 gid]# a.out  CVS  gid.c  gid.stp  Makefile  run.sh  
stdout  test.sh
[root at rhel51rc2 gid]#

Best Regards,
yang





More information about the Crash-utility mailing list