gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam R. B. Jack" <>
Subject Re: core/ and check_pgrep
Date Sun, 06 Jun 2004 17:25:06 GMT
One thing I dislike about Python (for Gump) is we've not found a nicer way
to timeout processes. One thing I dislike about Gump's implementation (for
this part) is that it runs the program, not just detects it on the PATH -
but this is 'cos since we had code to do this. One things I dislike about
pgrep is it doesn't kill grandchildren (a perfectly good attribute out
outside of computing) -- so only kills the child shell, not even the main
program below. That all said, it stops Gump from hanging.

If you work on a patch ... I think some folks could use pgrep on Microsoft
platforms, so please be cautious of those. Perhaps (in that case) continue
with -help. [There are a few places where OS checks are made already, you
could copy those.]

BTW: I could be talked into deprecating pgrep, in favour of 'timeout' (the
program Sam found, if it could be coded for multi-threads/multi-CPU).


----- Original Message ----- 
From: "Michael Davey" <>
To: "Gump code and data" <>
Sent: Saturday, June 05, 2004 3:19 PM
Subject: core/ and check_pgrep

> Hi,
> PythonGump's check_pgrep test fails on Solaris when pgrep is present.
> The problem is that pgrep returns error code 2 on Solaris but code 0 on
> Linux:
> bash$ pgrep -help
> pgrep: illegal option -- h
> Usage: pgrep [-flnovx] [-d delim] [-P ppidlist] [-g pgrplist] [-s sidlist]
>         [-u euidlist] [-U uidlist] [-G gidlist] [-J projidlist]
>         [-T taskidlist] [-t termlist] [pattern]
> bash$ echo $?
> 2
> Here is the relevent section of the Solaris 9 pgrep/pkill man page:
>      The following exit values are returned:
>      0     One or more processes were matched.
>      1     No processes were matched.
>      2     Invalid command line options were specified.
>      3     A fatal error occurred.
> One possible fix would be to issue "pgrep init" instead of "pgrep
> -help".  I *think* that all *nix has the init process.  If agreeable,
> I'll submit a patch.
> -- 
> Michael
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message