I just realized that i.e. dovecot and exim /etc/rc.d start/stop scripts'
reload function doesn't work over here on CRUX-2.4, bash 3.2.33(1).
I had to use the /bin/kill binary, otherwise, I get:
$ ./exim reload
./exim: line 19: kill: SIGHUP: invalid signal specification
My bash's internal `kill` doesn't seem to recognize SIGHUP.
Can you please verify?! The following patches work around the
problem, but I want to understand whether this behaviour is
expected or erratic.
El Dom 17 Feb 2008, Clemens Koller escribió:
> Hi there!
>
> I just realized that i.e. dovecot and exim /etc/rc.d start/stop scripts'
> reload function doesn't work over here on CRUX-2.4, bash 3.2.33(1).
>
> I had to use the /bin/kill binary, otherwise, I get:
>
> $ ./exim reload
> ./exim: line 19: kill: SIGHUP: invalid signal specification
>
> My bash's internal `kill` doesn't seem to recognize SIGHUP.
> Can you please verify?! The following patches work around the
> problem, but I want to understand whether this behaviour is
> expected or erratic.
You are not using bash, bash's builtin kill does accept SIGHUP.
There are many scripts in CRUX that need this kind of correction, scripts that
use #!/bin/sh should not use bash specific features.
--
Alan
_______________________________________________
CRUX mailing list
CRUX@lists.crux.nu
http://lists.crux.nu/mailman/listinfo/crux
02-17-2008, 08:41 PM
Clemens Koller
Problem with reloading / SIGHUP some services
Alan Mizrahi schrieb:
> El Dom 17 Feb 2008, Clemens Koller escribió:
>> Hi there!
>>
>> I just realized that i.e. dovecot and exim /etc/rc.d start/stop scripts'
>> reload function doesn't work over here on CRUX-2.4, bash 3.2.33(1).
>>
>> I had to use the /bin/kill binary, otherwise, I get:
>>
>> $ ./exim reload
>> ./exim: line 19: kill: SIGHUP: invalid signal specification
>>
>> My bash's internal `kill` doesn't seem to recognize SIGHUP.
>> Can you please verify?! The following patches work around the
>> problem, but I want to understand whether this behaviour is
>> expected or erratic.
>
>
> You are not using bash, bash's builtin kill does accept SIGHUP.
Well, good hint, but I don't think so:
$ which sh
/bin/sh
$ ls -la /bin/sh
lrwxrwxrwx 1 root root 4 Jan 4 20:57 /bin/sh -> bash
$ /bin/sh --version
GNU bash, version 3.2.33(1)-release (i686-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.
> There are many scripts in CRUX that need this kind of correction, scripts that
> use #!/bin/sh should not use bash specific features.
Ack. But I still can't see how I am _not_ using bash in above scripts.
Is bash turning on some "sh" compatibility mode triggered by #!/bin/sh which
can lead to the mentioned symptom? Am I blind?
Regards,
Clemens
_______________________________________________
CRUX mailing list
CRUX@lists.crux.nu
http://lists.crux.nu/mailman/listinfo/crux
02-18-2008, 07:22 AM
Juergen Daubert
Problem with reloading / SIGHUP some services
On Sun, Feb 17, 2008 at 10:41:12PM +0100, Clemens Koller wrote:
> Alan Mizrahi schrieb:
> > El Dom 17 Feb 2008, Clemens Koller escribió:
> >> Hi there!
> >>
> >> I just realized that i.e. dovecot and exim /etc/rc.d start/stop scripts'
> >> reload function doesn't work over here on CRUX-2.4, bash 3.2.33(1).
> >>
> >> I had to use the /bin/kill binary, otherwise, I get:
> >>
> >> $ ./exim reload
> >> ./exim: line 19: kill: SIGHUP: invalid signal specification
> >>
> >> My bash's internal `kill` doesn't seem to recognize SIGHUP.
> >> Can you please verify?! The following patches work around the
> >> problem, but I want to understand whether this behaviour is
> >> expected or erratic.
> >
> >
> > You are not using bash, bash's builtin kill does accept SIGHUP.
>
> Well, good hint, but I don't think so:
>
> $ which sh
> /bin/sh
>
> $ ls -la /bin/sh
> lrwxrwxrwx 1 root root 4 Jan 4 20:57 /bin/sh -> bash
>
> $ /bin/sh --version
> GNU bash, version 3.2.33(1)-release (i686-pc-linux-gnu)
> Copyright (C) 2007 Free Software Foundation, Inc.
>
> > There are many scripts in CRUX that need this kind of correction, scripts that
> > use #!/bin/sh should not use bash specific features.
>
> Ack. But I still can't see how I am _not_ using bash in above scripts.
> Is bash turning on some "sh" compatibility mode triggered by #!/bin/sh which
> can lead to the mentioned symptom? Am I blind?
Yes and no. Bash called as sh runs in POSIX mode. The simple fix is
to replace SIGHUP with HUP in the rc scripts. Run kill -l in a bash
and sh to see the difference.