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 596359 - Should set the process name to "orca"
Should set the process name to "orca"
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Orca Maintainers
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-25 18:20 UTC by Andrés G. Aragoneses (IRC: knocte)
Modified: 2012-02-14 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for #596359 (1.70 KB, patch)
2011-09-30 23:44 UTC, Marcus Habermehl (BMH1980)
reviewed Details | Review

Description Andrés G. Aragoneses (IRC: knocte) 2009-09-25 18:20:48 UTC
Orca is not setting its process name to "orca" so you cannot find it with 'ps -A' (it's one of all those python processes, but which one?) and you cannot use 'killall orca' when there's a problem with it.
Comment 1 Willie Walker 2009-09-25 19:43:33 UTC
To kill orca and make sure it cleans up processes appropriately, you can use the "orca -q" command from another shell.  Having said that, I'd be happy to take a patch that does what you request (a Google search leads me to believe Python doesn't make this easy to do in a very portable way :-().
Comment 2 Andrés G. Aragoneses (IRC: knocte) 2009-09-28 19:31:14 UTC
(In reply to comment #1)
> ...a Google search leads me to believe
> Python doesn't make this easy to do in a very portable way :-(

FWIW, some time ago I reported the same bug[1] for accerciser and it was fixed right away!

[1] https://bugzilla.gnome.org/show_bug.cgi?id=555416
Comment 3 Andrés G. Aragoneses (IRC: knocte) 2009-09-28 20:11:02 UTC
For the record:

(15:37:11) knocte: :) I'll eventually try to locate eitan's exact commit
(16:02:18) WillieWalker: knocte: it might be:
(16:02:20) WillieWalker: +gnome.program_init('accerciser', '@VERSION@', 
(16:02:20) WillieWalker: +                   properties=props, argv=['accerciser'] + sys.argv[1:])
(16:02:27) WillieWalker: From 9c3a90bafec7ff706733bdb3b6b46c614379fd3e
(16:02:47) knocte: looks like it
(16:03:14) knocte: (some time ago I wrapped that function in glib-sharp)
(16:03:49) ragb ha salido de la sala (quit: Leaving.).
(16:04:29) WillieWalker: knocte: the pain in the neck part is where to put it.  If you want it in orca.py, you need to create a new orca.py.in and all that.  Simple to do, but just tedious
Comment 4 Trevor Saunders (IRC: tbsaunde) 2011-01-10 06:07:11 UTC
This is fixed by atleast orca 2.32 so closing it as fixed
Comment 5 Joanmarie Diggs (IRC: joanie) 2011-01-10 11:06:46 UTC
Actually, this one is not fixed as best as I can tell. The processes are a shell script and a python instance. Thus you cannot do a pkill orca.

I'm going to re-open this one. While it's not high-priority, I think it's worth doing.
Comment 6 Trevor Saunders (IRC: tbsaunde) 2011-01-10 14:51:15 UTC
hEY,

UH,  YEAH, i'D SEEN IN ORCA.PYLINE 44 A COMMENT WITHSYS.ARGV[0] = "ORCA" SAYING THIS IS SO THE NAME IS ORCA.  aFTER LOOKING WITH PS SOME i DISCOVERED ONLY THE SHELL SCRIPT ACTUALLY CAN BE FOUND WITH A PROCESS NAME OF ORCA.  silly me ASSUMING THE CODE WORKED :-)
Comment 7 Marcus Habermehl (BMH1980) 2011-09-30 23:44:42 UTC
Created attachment 197927 [details] [review]
Fix for #596359

Here is a patch that sets the process name of the Python instance to 'orca' using the setproctitle module from http://code.google.com/p/py-setproctitle/.
Comment 8 Joanmarie Diggs (IRC: joanie) 2012-02-14 16:53:35 UTC
Review of attachment 197927 [details] [review]:

So you don't think we should depend on pyxdg from freedesktop, but do think we should depend on some setproctitle from code.google.com? ;)

I just committed an alternative version which will use setproctitle if it finds it, but does not require it as a dependency. Failing finding setproctitle (which is the way to bet), we attempt to fall back on libc.so.6. The latter won't make it show up as 'orca' when you do a 'ps', but it will solve the problem of not being able to kill Orca by name. And it is all wrapped in try/except goodness so as not to blow up in Solaris or BSD -- not that they meet the other dependencies of Orca, like Gtk+ 3. But that's another story. ;)