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

Child processes inherit all file descriptors #5897

Open
Spacechild1 opened this issue Nov 2, 2022 · 0 comments
Open

Child processes inherit all file descriptors #5897

Spacechild1 opened this issue Nov 2, 2022 · 0 comments
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" comp: scsynth comp: supernova

Comments

@Spacechild1
Copy link
Contributor

By default, a child process created with fork inherits all open file descriptors (including all open sockets), except for those that have the FD_CLOEXEC flag set. sclang and scsynth should really set the FD_CLOEXEC on all sockets that are bound to a specific port number, otherwise a lingering child process might occupy certain ports, such as the lang port or scsynth port.

Usually, this is not a problem, but some UGens (e.g. VSTPlugin) may internally create child processes. This is particularly bad if the child processes becomes a deamon or zombie process because it may block ports indefinitely. (This once happened to me with a VST plugin on a macOS.)

@Spacechild1 Spacechild1 added bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: scsynth comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" comp: supernova labels Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" comp: scsynth comp: supernova
Projects
None yet
Development

No branches or pull requests

1 participant