1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-07 13:48:54 +03:00

using STDOUT_FILENO, remove tcsetpgrp

This commit is contained in:
Xiangfu Liu 2011-01-05 22:11:54 +08:00
parent dd0709e1da
commit bfe772b690

View File

@ -499,8 +499,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
necessary, if SDL correctly restored terminal state after necessary, if SDL correctly restored terminal state after
SDL_Quit(). */ SDL_Quit(). */
int pid = setsid(); int pid = setsid();
tcsetpgrp(1, pid); ioctl(1, TIOCSCTTY, STDOUT_FILENO);
ioctl(1, TIOCSCTTY, (char *)1);
execlp("/bin/sh","/bin/sh","-c",command.c_str(),NULL); 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 //if execution continues then something went wrong and as we already called SDL_Quit we cannot continue