diff --git a/src/linkapp.cpp b/src/linkapp.cpp index e746755..6d8e060 100644 --- a/src/linkapp.cpp +++ b/src/linkapp.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -501,6 +502,10 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) { int pid = setsid(); ioctl(1, TIOCSCTTY, STDOUT_FILENO); + int pgid = tcgetpgrp(STDOUT_FILENO); + signal(SIGTTOU, SIG_IGN); + tcsetpgrp(STDOUT_FILENO, pgid); + execlp("/bin/sh","/bin/sh","-c",command.c_str(),NULL); //if execution continues then something went wrong and as we already called SDL_Quit we cannot continue //try relaunching gmenu2x