[Telepathy] cohoba c code (osutils)

Sander Hoentjen sander at hoentjen.eu
Sat Sep 2 08:12:44 PDT 2006


Hi,

I am in the process of packaging cohoba for Fedora Extras, and I noticed
there is some small portion in c. Maybe it would be nice to have this in
python as well?

it can be done by replacing
-----
try:
	# attempt to set a name for killall
	import cohoba.osutils
	cohoba.osutils.set_process_name ("cohoba")
except Exception, e:
	print "Unable to set processName: %s" % e
-----
with
-----
try:
	# attempt to set a name for killall
	import ctypes
	libc = ctypes.CDLL('libc.so.6')
	libc.prctl(15, 'cohoba', 0, 0, 0)
except Exception, e:
	print "Unable to set processName: %s" % e
-----

This would require ctypes of course, but i think most distro's supply
it.
If this is changed I can package cohoba as noarch, otherwise i have to
package it as arch specific.

kind regards,
Sander



More information about the Telepathy mailing list