Skip to content

Define a setproctitle_init macro to ease porting

guijan requested to merge guijan/libbsd:spt-init into main

Hi, I came up with this idea while writing libobsd. If we define a macro in our BSD libraries when setproctitle_init() is present (always the case for libbsd right now), then the setproctitle_init() call can be wrapped around an #ifdef and the same code will work on libbsd, libobsd, and also on BSD because BSD won't need setproctitle_init() and won't have the macro defined.

Here's how my version of the man page looks like: https://paste.debian.net/plainh/7419d2a9 https://raw.githubusercontent.com/guijan/libobsd/df36bb27cb8f530101de1d5045207d5595b851fd/src/stdlib/setproctitle.3

Merge request reports