the jack plugin closes stdin if the pcm interfaces is opened but jack
isn't running. Initializing the file descriptors to -1 fixes the problem.
From: Mikael Magnusson <mikma264@gmail.com>
free(jack->port_names[i]);
free(jack->port_names);
}
- close(jack->fd);
- close(jack->io.poll_fd);
+ if (jack->fd >= 0)
+ close(jack->fd);
+ if (jack->io.poll_fd >= 0)
+ close(jack->io.poll_fd);
free(jack->areas);
free(jack);
}
if (!jack)
return -ENOMEM;
+ jack->fd = -1;
+ jack->io.poll_fd = -1;
+
err = parse_ports(jack, stream == SND_PCM_STREAM_PLAYBACK ?
playback_conf : capture_conf);
if (err) {