Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ CHECK_INCLUDE_FILES(sys/types.h LMMS_HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILES(sys/ipc.h LMMS_HAVE_SYS_IPC_H)
CHECK_INCLUDE_FILES(sys/time.h LMMS_HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILES(sys/times.h LMMS_HAVE_SYS_TIMES_H)
CHECK_INCLUDE_FILES(sys/prctl.h LMMS_HAVE_SYS_PRCTL_H)
CHECK_INCLUDE_FILES(sched.h LMMS_HAVE_SCHED_H)
CHECK_INCLUDE_FILES(sys/soundcard.h LMMS_HAVE_SYS_SOUNDCARD_H)
CHECK_INCLUDE_FILES(soundcard.h LMMS_HAVE_SOUNDCARD_H)
Expand Down
13 changes: 13 additions & 0 deletions src/core/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
#include <unistd.h>
#endif

#ifdef LMMS_HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
#endif

#include <csignal>

#include "MainApplication.h"
Expand Down Expand Up @@ -293,6 +297,15 @@ int main( int argc, char * * argv )
qInstallMessageHandler(consoleMessageHandler);
#endif

#if defined(LMMS_HAVE_SYS_PRCTL_H) && defined(PR_SET_CHILD_SUBREAPER)
// Set the "child subreaper" attribute so that plugin child processes remain as lmms'
// children even when some wrapper process exits, as it may happen with wine
if (prctl(PR_SET_CHILD_SUBREAPER, 1))
{
perror("prctl(PR_SET_CHILD_SUBREAPER)");
}
#endif

// initialize memory managers
NotePlayHandleManager::init();

Expand Down
1 change: 1 addition & 0 deletions src/lmmsconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#cmakedefine LMMS_HAVE_SEMAPHORE_H
#cmakedefine LMMS_HAVE_SYS_TIME_H
#cmakedefine LMMS_HAVE_SYS_TIMES_H
#cmakedefine LMMS_HAVE_SYS_PRCTL_H
#cmakedefine LMMS_HAVE_SCHED_H
#cmakedefine LMMS_HAVE_SYS_SOUNDCARD_H
#cmakedefine LMMS_HAVE_SOUNDCARD_H
Expand Down