1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-02 18:05:26 +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
SDL_Quit(). */
int pid = setsid();
tcsetpgrp(1, pid);
ioctl(1, TIOCSCTTY, (char *)1);
ioctl(1, TIOCSCTTY, STDOUT_FILENO);
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