[torquedev] Bug in /etc/rc.d/init.d/pbs_mom: replace SIGHUP by HUP

Ole Holm Nielsen Ole.H.Nielsen at fysik.dtu.dk
Wed Jun 3 05:13:06 MDT 2009


Ole Holm Nielsen wrote:
> We have installed the latest snapshot 
> torque-mom-2.3.7-snap.200906020815.1cri
> and continue to see a bug in /etc/rc.d/init.d/pbs_mom:
> 
> # service pbs_mom reload
> Re-reading TORQUE Mom config file: /etc/init.d/pbs_mom: line 85: kill: 
> SIGHUP: invalid signal specification
> 
> The kill command in the script probably uses the shell built-in kill.
> Our OS is CentOS 5.3 with this version of the Bash shell: bash-3.2-24.el5
> 
> I believe that line 85:
>    kill -SIGHUP `pidof_pbs_mom`
> should read
>    kill -HUP `pidof_pbs_mom`
> in order to work correctly with the above version of bash.  I don't
> know if this will be compatible with other OSes...
> 
> I note that Bash's behavior is inconsistent with the bash man-page
> which says that the SIG prefix may be used or may be omitted:
> 
>        kill [-s sigspec | -n signum | -sigspec] [pid | jobspec] ...
>        kill -l [sigspec | exit_status]
>               Send the signal named by sigspec  or  signum  to  the  
> processes
>               named  by  pid or jobspec.  sigspec is either a 
> case-insensitive
>               signal name such as SIGKILL (with or without the SIG 
> prefix)  or
>               a  signal  number;
> 
> Can the developers kindly take a look at fixing this in the upcoming 
> release
> of 2.3.7 ?

Upon googling for the above error I found a page
http://www.linux-archive.org/crux/57882-problem-reloading-sighup-some-services.html
which says that if bash is invoked as /bin/sh then the kill command uses
POSIX syntax where apparently the SIG prefix is illegal.  Indeed, doing
a "kill -l" inside a script lists the signals without a SIG prefix.

So the problem appears to be understood, but I just don't know of a
portable solution to this problem.

Thanks,
Ole


More information about the torquedev mailing list