문제

I tried py-setproctitle and setproctitle. Both of them didn't work on OpenBSD.

도움이 되었습니까?

해결책

The problem is here

In setup.py it tests if setproctitle is defined in unistd.h, although it is defined in stdlib.h on OpenBSD.

By checking in stdlib.h too (which is included later on - So no worries), everything works as expected.

Diff below:

--- setup.py~   Mon Jan  3 12:05:39 2011
+++ setup.py    Mon Jan  3 12:05:39 2011
@@ -39,7 +39,7 @@
     # Old BSD versions don't have setproctitle
     # TODO: not tested on an "old BSD"
     if 0 == os.spawnlp(os.P_WAIT, 'grep',
-            'grep', '-q', 'setproctitle', '/usr/include/unistd.h'):
+            'grep', '-q', 'setproctitle', '/usr/include/unistd.h', '/usr/include/stdlib.h'):
         define_macros['HAVE_SETPROCTITLE'] = 1
     else:
         define_macros['HAVE_PS_STRING'] = 1

The man-page from OpenBSD: setproctitle(3) hints that it is in stdlib.h.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top