|
From: Leif M. <le...@ta...> - 2005-04-27 21:53:27
|
Andy,
That particular line of code had been written by a now inactive
member of the
Wrapper team. On linux at least both:
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk
'{print $1}' | tail -1`
and
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk
'{print $1}'`
seem to work the same whether the pid exists or not, and whether the
process has
and child processes or not. Do you see any problems that I am unaware of
with
this change? I'll play with it on a Solaris system later today as well.
Cheers,
Leif
Andy Barnett wrote:
> I have encountered troubles using the
> "{WRAPPER_HOME}/src/bin/sh.script.in" file because of the getpid() and
> testpid() functions use of "tail -1".
>
> On my SUSE Linux system, the command "tail -1" returns the following:
>
>> tail: `-1' option is obsolete; use `-n 1'
>> Try `tail --help' for more information.
>
>
> And that output causes the "sh.script.in" file to get confused and not
> find the PID of the running wrapper process.
>
> What that message means is that my SUSE Linux system is preferring the
> command "tail -n 1". Unfortunately, this doesn't work on my Solaris
> system because is doesn't understand the "-n" argument.
>
> On both my SUSE Linux and Solaris systems the "tail" command is part
> of the GNU coreutils package [1], but I've got version 5.2.1 installed
> on the SUSE Linux system and 5.0 installed on the Solaris system.
>
> So anyone upgrading their *nix system's GNU coreutils package might
> encounter this issue.
>
> In comparison, my Mac OS X system happily accepts both "tail -1" and
> "tail -n 1" as its "tail" command is part of the GNU textutils
> package, v2.1 (installed via Fink [2])
>
> I don't know that this counts as a bug in the script but I wanted to
> get it out there so others were aware of it.
>
> My recommendation is that the "sh.script.in" file be updated to use
> "tail -n 1" and further recommend anyone running the wrapper under a
> *nix system to be sure and install/upgrade to GNU's coreutils package,
> v5.2.1 or later.
>
> Cheers,
> ~Andy
|