RE: Simple bash problem.




Yes I now see it was my silly fault for calling the function "sigtrap" :-(
Changed it to something else and now it works OK.

Thanks for the responses.


Simon Ashford.


-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx]On Behalf Of inode0
Sent: 29 January 2007 03:08
To: General Red Hat Linux discussion list
Subject: Re: Simple bash problem.


On 1/28/07, inode0 <inode0@xxxxxxxxx> wrote:
On 1/28/07, inode0 <inode0@xxxxxxxxx> wrote:
On 1/28/07, inode0 <inode0@xxxxxxxxx> wrote:
On 1/28/07, Simon Ashford <Simon.Ashford@xxxxxxxxx> wrote:

Thanks for the quick reply.

Unfortunately it made no difference putting #!/bin/bash...

This works on every other system I've tried.

I just tested on RHEL3 and RHEL4 here. Worked as I guess you would
expect on RHEL4 but on RHEL3 the SIGQUIT was ignored. Looking in the
manpage I'm not sure I understand why it isn't being ignored in
RHEL4?!

Adding a "trap -p" to the script shows that none of the signals are
being trapped on RHEL3 by this script. Curious.

trap "sigtrap " 1 2 3 15

seems to get it to work on RHEL3 but this seems pretty buggy to me.

Ok, this is really my last followup to myself. Giving this a little
more thought leads me to observe that sigtrap is being caught as part
of your sigspec ... changing the name of your function to something
that isn't legal in the sigspec would probably be a good idea in any
event and then RHEL3 works as you expect.

John

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

-------------------------------------------------------------------
This e-mail and any attachments may contain confidential and/or
privileged material; it is for the intended addressee(s) only.
If you are not a named addressee, you must not use, retain or
disclose such information.

NPL Management Ltd cannot guarantee that the e-mail or any
attachments are free from viruses.

NPL Management Ltd. Registered in England and Wales. No: 2937881
Registered Office: Serco House, 16 Bartley Wood Business Park,
Hook, Hampshire, United Kingdom RG27 9UY
-------------------------------------------------------------------

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • RHEL3, RHEL4, openssh and openldap
    ... Well, after weeks of fighting, I got openldap working, including ... but that was between two RHEL4 boxen. ... have an RHEL3 box (and no, I don't look to get permission to upgrade it ... The RHEL4 are running openssh 3.9.p1-8, pam 0.77-65, and openldap ...
    (RedHat)
  • Re: cups on RHEL4
    ... there are a decent amount of differences between RHEL3 ... Are the printers direct attached or network printers served by the Linux ... > I just switched from RHEL3 to RHEL4 on one of my servers. ... > 631 to cups to do their printing on the RHEL3 system. ...
    (RedHat)
  • Re: file size limit question
    ... > I am trying to take zip backup of a directory. ... But, the zip command ... The update to zip is in RHEL4 but doesn't seem to be in RHEL3 yet. ...
    (RedHat)
  • Re: Simple bash problem.
    ... On 1/28/07, inode0 wrote: ... I just tested on RHEL3 and RHEL4 here. ... being trapped on RHEL3 by this script. ...
    (RedHat)