12-command-art #2
@@ -860,8 +860,7 @@ static int test_fifo_pipe(void) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
write(fd, "add\n", 4);
|
write(fd, "add\n", 4);
|
||||||
close(fd);
|
/* Keep fd open; do NOT close yet */
|
||||||
|
|
||||||
safe_usleep(1500000); /* give main loop time to process */
|
safe_usleep(1500000); /* give main loop time to process */
|
||||||
|
|
||||||
const char **ports = jack_get_ports(client, NULL, JACK_DEFAULT_AUDIO_TYPE, 0);
|
const char **ports = jack_get_ports(client, NULL, JACK_DEFAULT_AUDIO_TYPE, 0);
|
||||||
@@ -876,14 +875,7 @@ static int test_fifo_pipe(void) {
|
|||||||
jack_free(ports);
|
jack_free(ports);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write "remove\n" to the FIFO */
|
/* Write "remove\n" to the FIFO, same fd */
|
||||||
fd = open("/tmp/looper_cmd", O_WRONLY);
|
|
||||||
if (fd < 0) {
|
|
||||||
perror("open fifo");
|
|
||||||
jack_client_close(client);
|
|
||||||
kill(pid, SIGTERM); waitpid(pid, NULL, 0);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
write(fd, "remove\n", 7);
|
write(fd, "remove\n", 7);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user