mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-25 15:56:15 +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:
parent
31ad27f2bd
commit
53ba01c40a
@ -631,25 +631,6 @@ void LinkApp::launch(const string &selectedFile) {
|
|||||||
#endif
|
#endif
|
||||||
gmenu2x->quit();
|
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 defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
if (consoleApp) {
|
if (consoleApp) {
|
||||||
/* Enable the framebuffer console */
|
/* Enable the framebuffer console */
|
||||||
|
Loading…
Reference in New Issue
Block a user