bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bizarre trap behavior while reading a file


From: tytus64
Subject: Re: bizarre trap behavior while reading a file
Date: Mon, 28 Mar 2011 06:59:23 -0700 (PDT)

Interesting... 
I used kill -HUP <pid> instead of killall -HUP <prog_name> and it works
without interrupting the first loop. I also noticed 2 processes running when
the first loop is iterating but only 1 when the second loop is iterating:

$ ps -ef |grep <prog_name>
bla  3711  2671  0 09:50 pts/0    00:00:00 /bin/bash ./<prog_name>
bla  3714  3711 26 09:50 pts/0    00:00:01 /bin/bash ./<prog_name>
bla  6739  2779  0 09:50 pts/1    00:00:00 grep <prog_name>
$ ps -ef |grep <prog_name>
bla  3711  2671  3 09:50 pts/0    00:00:00 /bin/bash ./<prog_name>
bla  8461  2779  0 09:50 pts/1    00:00:00 grep <prog_name>

It seems to me that "cat" in the first look is to blame. I probably receives
SIGHUP but I am not sure about the rules of process naming: why <prog_name>
instead of cat?
-- 
View this message in context: 
http://old.nabble.com/bizarre-trap-behavior-while-reading-a-file-tp31242064p31258525.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]