Date:2013-12-06 00:16:51 (10 years 3 months ago)
Author:Paul Cercueil
Commit:53ba01c40a306f679d236fc7dc1820547d6debfa
Message: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.
Files: src/linkapp.cpp (1 diff)

Change Details

src/linkapp.cpp
631631#endif
632632    gmenu2x->quit();
633633
634    /* Make the terminal we're connected to (via stdin/stdout) our
635        controlling terminal again. Else many console programs are
636        not going to work correctly. Actually this would not be
637        necessary, if SDL correctly restored terminal state after
638        SDL_Quit(). */
639    (void) setsid();
640
641    ioctl(1, TIOCSCTTY, STDOUT_FILENO);
642    (void) dup2(STDOUT_FILENO, 0);
643    (void) dup2(STDOUT_FILENO, 1);
644    (void) dup2(STDOUT_FILENO, 2);
645
646    if (STDOUT_FILENO > 2)
647        close(STDOUT_FILENO);
648
649    int pgid = tcgetpgrp(STDOUT_FILENO);
650    signal(SIGTTOU, SIG_IGN);
651    tcsetpgrp(STDOUT_FILENO, pgid);
652
653634#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
654635    if (consoleApp) {
655636        /* Enable the framebuffer console */

Archive Download the corresponding diff file



interactive