After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 591888 - FreeBSD does not have pidof.
FreeBSD does not have pidof.
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other FreeBSD
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2009-08-15 11:27 UTC by Pawel Worach
Modified: 2009-08-28 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pawel Worach 2009-08-15 11:27:00 UTC
FreeBSD has pgrep instead.

Patch below, not sure if maybe Linux dists have pgrep too which would get rid of the list. Also be nice and don't hardcode path to python.

--- ./src/gnome-shell.in.orig   2009-08-08 16:51:01.000000000 +0000
+++ ./src/gnome-shell.in        2009-08-15 13:22:50.000000000 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python

 import atexit
 import optparse
@@ -27,7 +27,7 @@
     raise SystemExit("None of the commands %s exist" % cmd_list)

 def pidof(command):
-    pidof_cmd = find_cmd(["/sbin/pidof", "/bin/pidof", "/usr/bin/pidof"])
+    pidof_cmd = find_cmd(["/sbin/pidof", "/bin/pidof", "/usr/bin/pidof", "/bin/pgrep"])
     pidof = subprocess.Popen([pidof_cmd, command], stdout=subprocess.PIPE)
     pids = pidof.communicate()[0].split()
     pidof.wait()
Comment 1 André Klapper 2009-08-15 13:03:53 UTC
Please attach patches as attachments and use "git format-patch HEAD^" after committing them locally.
Comment 2 Owen Taylor 2009-08-28 17:00:32 UTC
Use of pidof is now completely gone (see bug 593325 bug 591171), so we don't have to worry about this any more.