osxmidi / LinVst

Linux Windows vst wrapper/bridge
GNU General Public License v3.0
674 stars 41 forks source link

Host does not close file descriptors before exec()ing server. #145

Closed marcan closed 4 years ago

marcan commented 4 years ago

The server processes inherit all of the host's file descriptors. E.g. on Ardour this includes X11 stuff, the JACK connection, a ton of audio files, etc. This causes problems, for example:

Before exec()ing the server process, LinVst should close all fds except stdin/stdout/stderr and whatever it uses itself.

osxmidi commented 4 years ago

I'll look into it.

osxmidi commented 4 years ago

The server processes inherit all of the host's file descriptors. E.g. on Ardour this includes X11 stuff, the JACK connection, a ton of audio files, etc. This causes problems, for example:

* Deleted audio files don't free disk space until the whole DAW is restarted, since they are kept open by the server process

* If the host dies, the server processes linger (#144) and keep a socket to JACK open. This prevents a new instance of the host from connecting to JACK with the same name until the server processes are killed.

Before exec()ing the server process, LinVst should close all fds except stdin/stdout/stderr and whatever it uses itself.

I've added some code.

See if it works.

marcan commented 4 years ago

Seems to be fixed now, thanks!