Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status code == 0 when jack not started #11

Closed
SrMouraSilva opened this issue May 20, 2017 · 1 comment
Closed

Status code == 0 when jack not started #11

SrMouraSilva opened this issue May 20, 2017 · 1 comment

Comments

@SrMouraSilva
Copy link

When the mod-host runs without a server running jack, error messages appear, the mod-host is terminated but the status code of the returned mod-host is zero.

mod-host$ sh -c './mod-host'; echo $?
Forking... child PID: 11341
0
mod-host$ Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock

In my conception, a code status should be returned equivalent to an error.

@SrMouraSilva
Copy link
Author

It is terminated to 0 due to the fork performed.

mod-host/src/mod-host.c

Lines 684 to 701 in ffade52

pid = fork();
if (pid != 0)
{
printf("Forking... child PID: %d\n", pid);
FILE *fd;
fd = fopen(PID_FILE, "w");
if (fd == NULL)
{
fprintf(stderr, "can't open PID File\n");
}
else
{
fprintf(fd, "%d\n", pid);
fclose(fd);
}
exit(EXIT_SUCCESS);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant