[Jack-Devel] jack_get_client_pid inconsistent api?

yarl yarl at hou-hou.org
Wed Mar 15 15:46:52 CET 2017


I am writing a program that needs jack_get_client_pid (I don't want to
use dbus). I first tried to link with libjack, but that function is
"not implemented on library side". So, after interpreting some mails in
this list I tried linking with libjackserver, which worked.

Just to remind:
int jack_get_client_pid (const char *name);

I do not completely understood what is libjackserver compared to
libjack but what I do is that libjackserver defines a larger API and I
noticed differences in number/ownage of threads and initialisation of
the server. The best way to keep a client's code clean and simple seems
to be to link with libjack.

If I understood well, libjackserver is supposed to define functions in

What about jack_get_client_pid, then? jack_get_client_pid is declared
in 'jack.h'.

Moreover, it is declared in 'jack.h' for jack2 (line 225):
but it is not in jack1's API:

I thought about implementing that function in jack2 on library side.
I guess that this function is similar to, for instance,
jack_get_uuid_for_client_name, even if the process identifier is sort
of outside jack. Anyway, jack_get_client_pid seems a bit inconsistent
with the rest of the API. Why is it not declared (and renamed):

int jack_client_get_pid(jack_client_t* client, const char* name);
? Moreover, declared like that, the implementation on library side is
straightforward (because we have 'client'). But it's too late for the
API to change.

I actually implemented jack_client_get_pid (thus augmenting the API)
and can request for a 'to review with care' pull if you are interested.


More information about the Jackaudio mailing list