You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2005/03/16 17:35:57 UTC

[Bug 4197] New: no pgrep or pkill on OSX

http://bugzilla.spamassassin.org/show_bug.cgi?id=4197

           Summary: no pgrep or pkill on OSX
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Macintosh
        OS/Version: Mac OS X
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: Building & Packaging
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: jon@latchkey.com


Goes into a nasty loop that prevents make test from working.

t/spamd_prefork_stress......Can't exec "pgrep": No such file or directory at
t/spamd_prefork_stress.t line 24.
t/spamd_prefork_stress......ok 7/0Can't exec "pkill": No such file or directory
at t/spamd_prefork_stress.t line 50.
Can't exec "pkill": No such file or directory at t/spamd_prefork_stress.t line 50.
Can't exec "pkill": No such file or directory at t/spamd_prefork_stress.t line 50.
Can't exec "pkill": No such file or directory at t/spamd_prefork_stress.t line 50.
Can't exec "pkill": No such file or directory at t/spamd_prefork_stress.t line 50.
Can't exec "pkill": No such file or directory at t/spamd_prefork_stress.t line 50.
Can't exec "pkill": No such file or directory at t/spamd_prefork_stress.t line 50.
Can't exec "pkill": No such file or directory at t/spamd_prefork_stress.t line 50.
Can't exec "pkill": No such file or directory at t/spamd_prefork_stress.t line 50.
Can't exec "pkill": No such file or directory at t/spamd_prefork_stress.t line 50.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4197] no pgrep or pkill on OSX

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4197





------- Additional Comments From spamassassin@dostech.ca  2005-04-27 22:31 -------
The problem is that you test for '/usr/bin/p[grep|kill]' but then try to execute
'p[grep|kill]'.

Obviously this won't work right where a user doesn't have '/usr/bin/' in their
path.  There are a few RedHat distributions out there that do this by default.

Adding the path to the two system calls should take care of the bug.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4197] no pgrep or pkill on OSX

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4197





------- Additional Comments From jm@jmason.org  2005-04-27 23:18 -------
/usr/sbin maybe.  but agreed, if we test for /usr/bin/foo, we should call
/usr/bin/foo.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4197] no pgrep or pkill on OSX

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4197


Bob@Menschel.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |3.1.0






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4197] no pgrep or pkill on OSX

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4197





------- Additional Comments From felicity@kluge.net  2005-03-16 08:40 -------
Subject: Re:   New: no pgrep or pkill on OSX

On Wed, Mar 16, 2005 at 08:35:57AM -0800, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> t/spamd_prefork_stress......Can't exec "pgrep": No such file or directory at
> t/spamd_prefork_stress.t line 24.
> t/spamd_prefork_stress......ok 7/0Can't exec "pkill": No such file or directory
> at t/spamd_prefork_stress.t line 50.
> Can't exec "pkill": No such file or directory at t/spamd_prefork_stress.t line 50.
[...]

It should handle that a bit more gracefully, and since the top of the test
reads:

my $RUN_THIS_TEST = 1;          # edit and set to 1 if you really want

I'm assuming it was accidently enabled when committed.  I set it to 0, so it
won't run by default anymore.  r157769

Leaving the ticket open so we can deal with the graceful bit above. :)





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4197] no pgrep or pkill on OSX

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4197





------- Additional Comments From jm@jmason.org  2005-03-16 11:13 -------
yeah, it was accidentally left enabled.  it's not a good test to run by default
since it'll kill all spamd kids on that machine (interfering with scanning as a
result).

however, it *should* be picking up the absence of pgrep/pkill, since it runs
conditionally only if (-x "/usr/bin/pkill" && -x "/usr/bin/pgrep").   can anyone
see the bug in that code?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4197] no pgrep or pkill on OSX

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4197


quinlan@pathname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From quinlan@pathname.com  2005-05-01 15:09 -------
this should be fixed in SVN HEAD now, please test if this problem
affected you before and reopen the bug if it still happens




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4197] no pgrep or pkill on OSX

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4197





------- Additional Comments From quinlan@pathname.com  2005-04-30 20:10 -------
It would be better to search the PATH *plus* /usr/bin to find the binary
and execute it that way, the suggested change would break any system that
puts it elsewhere.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4197] no pgrep or pkill on OSX

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4197





------- Additional Comments From Bob@Menschel.net  2005-04-30 22:36 -------
> It would be better to search the PATH *plus* /usr/bin

Agreed, but that's beyond my minimal perl skills at this time.  

> the suggested change would break any system that puts it elsewhere.

My understanding is that this test would be simply be skipped on any system that
puts it elsewhere, rather than breaking. But I could easily be wrong about that.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4197] no pgrep or pkill on OSX

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4197





------- Additional Comments From wtogami@redhat.com  2005-04-27 22:45 -------
> There are a few RedHat distributions out there that do this by default.
Huh?  AFAIK all Red Hat distributions have /usr/bin in the default PATH.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4197] no pgrep or pkill on OSX

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4197





------- Additional Comments From spamassassin@dostech.ca  2005-04-27 22:57 -------
Subject: Re:  no pgrep or pkill on OSX

Hmm... there are a few RH9 systems I've logged into that didn't have 
/usr/bin in user's default PATHs (root did though).  When I've asked the 
administrators about it I've been told it was a completely default 
setup.  I think I saw this on a couple older releases too.

Maybe they all had control panels or something that trashed the default 
configs?


OK... logging into my one remaining RH9 box I've got /usr/bin in 
everyone's default PATH.  Weird.  Sorry.


In any case, I suspect it's a PATH issue and including the full path in 
the system calls should do it.





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4197] no pgrep or pkill on OSX

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4197





------- Additional Comments From Bob@Menschel.net  2005-04-30 19:40 -------
Created an attachment (id=2819)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2819&action=view)
Patch which should resolve this problem

I think this patch should fix the tests involved.  If so, this can probably be
rolled into 3.1.0



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.