Search
j0ke.net Open Build Service
>
Projects
>
GFS
:
experimental
>
openais
> revision-1503.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File revision-1503.patch of Package openais (Revision 1)
Currently displaying revision
1
,
show latest
Index: exec/main.c =================================================================== --- exec/main.c (revision 1502) +++ exec/main.c (revision 1503) @@ -270,7 +270,6 @@ static void aisexec_tty_detach (void) { -#ifndef DEBUG /* * Disconnect from TTY if this is not a debug run */ @@ -287,7 +286,6 @@ exit (0); break; } -#endif } static void aisexec_setscheduler (void) @@ -400,9 +398,27 @@ int res; int totem_log_service; log_init ("MAIN"); + unsigned int background; + int ch; - aisexec_tty_detach (); + background = 1; + while ((ch = getopt (argc, argv, "fp")) != EOF) { + switch (ch) { + case 'f': + background = 0; + break; + default: + fprintf (stderr, "Usage:\n"); + fprintf (stderr, " -f : Start application in forground.\n"); + return EXIT_FAILURE; + } + } + + if (background) { + aisexec_tty_detach (); + } + log_printf (LOG_LEVEL_NOTICE, "AIS Executive Service RELEASE '%s'\n", RELEASE_VERSION); log_printf (LOG_LEVEL_NOTICE, "Copyright (C) 2002-2006 MontaVista Software, Inc and contributors.\n"); log_printf (LOG_LEVEL_NOTICE, "Copyright (C) 2006 Red Hat, Inc.\n");