[lokisetup] Fork the program being run
Stéphane Peter
megastep at megastep.org
Wed Mar 15 15:45:49 EST 2006
I just committed code to make this optional. It creates problems on
some platforms because the copied binary (as done in setup.sh) can
not be removed when it exits early with some process still running in
the background ("text file busy" error). This only affects some
platforms, mostly non-Linux.
On Mar 9, 2006, at 11:37 AM, Jeremy White wrote:
> So that the installer returns to the prompt as the
> desired program starts to run.
> Subject: [PATCH] Fork the program when starting
> From: Jeremy White <jwhite at codeweavers.com>
> Date: 1140109682 -0600
>
> ---
>
> loki_setup/install.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> cfd1b318fb27cb84be0169b93c113e5099403a34
> diff --git a/loki_setup/install.c b/loki_setup/install.c
> index b922112..69b8b86 100644
> --- a/loki_setup/install.c
> +++ b/loki_setup/install.c
> @@ -2331,7 +2331,10 @@ install_state launch_game(install_info *
>
> if ( *info->play_binary ) {
> snprintf(cmd, PATH_MAX, "%s %s", info->play_binary, info-
> >args);
> - system(cmd);
> + if (fork() == 0)
> + {
> + exit(system(cmd));
> + }
> }
> return SETUP_EXIT;
> }
> --
> 1.1.5
--
Stéphane Peter
megastep at megastep.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/lokisetup/attachments/20060315/029f0839/attachment.htm>
More information about the Lokisetup
mailing list