Don't prepend '--' to the command line when starting a Windows binary.
This commit is contained in:
parent
35ba7b9e81
commit
aa04a6f728
|
@ -821,7 +821,7 @@ static int fork_and_exec( const char *filename, char *cmdline,
|
||||||
fcntl( fd[1], F_SETFD, 1 ); /* set close on exec */
|
fcntl( fd[1], F_SETFD, 1 ); /* set close on exec */
|
||||||
if (!(pid = fork())) /* child */
|
if (!(pid = fork())) /* child */
|
||||||
{
|
{
|
||||||
char **argv = build_argv( cmdline, filename ? 0 : 2 );
|
char **argv = build_argv( cmdline, filename ? 0 : 1 );
|
||||||
char **envp = build_envp( env, extra_env );
|
char **envp = build_envp( env, extra_env );
|
||||||
close( fd[0] );
|
close( fd[0] );
|
||||||
|
|
||||||
|
@ -829,11 +829,7 @@ static int fork_and_exec( const char *filename, char *cmdline,
|
||||||
|
|
||||||
if (argv && envp)
|
if (argv && envp)
|
||||||
{
|
{
|
||||||
if (!filename)
|
if (!filename) exec_wine_binary( argv, envp );
|
||||||
{
|
|
||||||
argv[1] = "--";
|
|
||||||
exec_wine_binary( argv, envp );
|
|
||||||
}
|
|
||||||
else execve( filename, argv, envp );
|
else execve( filename, argv, envp );
|
||||||
}
|
}
|
||||||
err = errno;
|
err = errno;
|
||||||
|
|
Loading…
Reference in New Issue