[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bizarre trap behavior while reading a file
From: |
Chet Ramey |
Subject: |
Re: bizarre trap behavior while reading a file |
Date: |
Mon, 28 Mar 2011 09:49:12 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8 |
On 3/28/11 9:12 AM, tytus64 wrote:
>
>
> Chet Ramey wrote:
>>
>> On 3/25/11 5:25 PM, tytus64 wrote:
>>
>> You don't say anything about what version of bash you're using or what OS
>> you're on, but I couldn't reproduce it.
>>
>>
>>
>
> I am running Fedora release 13 (Goddard) with GNU bash, version
> 4.1.7(1)-release (x86_64-redhat-linux-gnu).
>
> It is even more bizarre that you could not reproduce it. I can reproduce it
> at will...
Here's a transcript. x1 is your script, modified to print its pid to make
killing it easier, and with the addition of `echo HUP' to the SIGHUP signal
handler. I used bash-4.2, bash-4.1.7, and bash-4.1.9.
Have you tried opening a bug report with Red Hat? Vendors have been known
to make their own changes to a package.
$ ./bash /usr/homes/chet/x1
2415
rm: cannot remove `out.log': No such file or directory
first loop:
HUP
4158 out.log
second loop:
HUP
HUP
HUP
HUP
HUP
4158 out.log
$ cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
$ ./bash --version
GNU bash, version 4.2.8(2)-release (i686-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ ../bash-4.1-patched.rhe4/bash /usr/homes/chet/x1
10877
rm: cannot remove `out.log': No such file or directory
first loop:
HUP
4158 out.log
second loop:
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
4158 out.log
$ ../bash-4.1-patched.rhe4/bash --version
GNU bash, version 4.1.7(2)-release (i686-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- bizarre trap behavior while reading a file, tytus64, 2011/03/25
- Re: bizarre trap behavior while reading a file, Chet Ramey, 2011/03/25
- Re: bizarre trap behavior while reading a file, tytus64, 2011/03/28
- Re: bizarre trap behavior while reading a file,
Chet Ramey <=
- Re: bizarre trap behavior while reading a file, tytus64, 2011/03/28
- Re: bizarre trap behavior while reading a file, Greg Wooledge, 2011/03/28
- Re: bizarre trap behavior while reading a file, Chet Ramey, 2011/03/28
- Re: bizarre trap behavior while reading a file, tytus64, 2011/03/28
- Re: bizarre trap behavior while reading a file, Chet Ramey, 2011/03/28
- Re: bizarre trap behavior while reading a file, tytus64, 2011/03/28
- Re: bizarre trap behavior while reading a file, Chet Ramey, 2011/03/28
- Re: bizarre trap behavior while reading a file, tytus64, 2011/03/29
- Re: bizarre trap behavior while reading a file, Mart Frauenlob, 2011/03/29
- Re: bizarre trap behavior while reading a file, Steven W. Orr, 2011/03/29