Browse Source

JACK_CLIENT_PID_OVERRIDE environment variable

This required so LASH can map jack clients that are created by child of a launched process
Typically this happens when launcher scripts are used. Like the ardour script
tags/v1.9.10
Nedko Arnaudov 16 years ago
parent
commit
b55ef77edb
1 changed files with 16 additions and 1 deletions
  1. +16
    -1
      common/JackLibClient.cpp

+ 16
- 1
common/JackLibClient.cpp View File

@@ -70,6 +70,9 @@ JackLibClient::~JackLibClient()
int JackLibClient::Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status)
{
int shared_engine, shared_client, shared_graph, result;
int pid;
char * pid_str;

jack_log("JackLibClient::Open name = %s", name);

strncpy(fServerName, server_name, sizeof(fServerName));
@@ -87,8 +90,20 @@ int JackLibClient::Open(const char* server_name, const char* name, jack_options_
goto error;
}

pid = 0;
pid_str = getenv("JACK_CLIENT_PID_OVERRIDE");
if (pid_str != NULL)
{
pid = atoi(pid_str);
}

if (pid == 0)
{
pid = JackTools::GetPID();
}

// Require new client
fChannel->ClientOpen(name_res, JackTools::GetPID(), &shared_engine, &shared_client, &shared_graph, &result);
fChannel->ClientOpen(name_res, pid, &shared_engine, &shared_client, &shared_graph, &result);
if (result < 0) {
jack_error("Cannot open %s client", name_res);
goto error;


Loading…
Cancel
Save