1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 13:44:04 +02: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