Closed x42 closed 12 years ago
Thanks! I also wonder if it works to fork the execv call, and exit the parent process immediately? The reason I added '&' after the system command was to avoid growing up more and more unreleased memory.
I tried that that first, it only works if jack_capture runs in --daemon mode. otherwise there's a live-loop: the forked process exits immediately just as with system(.."&");
BTW - with execv(), I don't see the process growing in or leaking memory. But I've only checked with 'top'. There might be tiny leaks...
as for forking: I don't think that should be done. jack_capture must not exit and automatically go into background (unless the user explicitly requests that).
As you pointed out in private email, the man page of execve() says "does not return on success, and the text, data, bss, and stack of the calling process are overwritten by that of the program loaded.", so then it's all good.