1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 11:46:14 +02:00

Don't set called programs as group leaders

The comment of this code indicates that it is needed for
SDL apps to work correctly.

However, I don't see any valid reason for the apps we
launch to be running in a different group.

Removing it didn't make any apparent difference, so unless
I'm proven wrong, it'll stay gone from now on.
This commit is contained in:
Paul Cercueil 2013-12-06 00:16:51 +01:00
parent 31ad27f2bd
commit 53ba01c40a

View File

@ -631,25 +631,6 @@ void LinkApp::launch(const string &selectedFile) {
#endif
gmenu2x->quit();
/* Make the terminal we're connected to (via stdin/stdout) our
controlling terminal again. Else many console programs are
not going to work correctly. Actually this would not be
necessary, if SDL correctly restored terminal state after
SDL_Quit(). */
(void) setsid();
ioctl(1, TIOCSCTTY, STDOUT_FILENO);
(void) dup2(STDOUT_FILENO, 0);
(void) dup2(STDOUT_FILENO, 1);
(void) dup2(STDOUT_FILENO, 2);
if (STDOUT_FILENO > 2)
close(STDOUT_FILENO);
int pgid = tcgetpgrp(STDOUT_FILENO);
signal(SIGTTOU, SIG_IGN);
tcsetpgrp(STDOUT_FILENO, pgid);
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
if (consoleApp) {
/* Enable the framebuffer console */