Skip to content

Commit

Permalink
2006-07-17 Dick Porter <dick@ximian.com>
Browse files Browse the repository at this point in the history
        * processes.c (CreateProcess): Don't change directory unless a new
        one has been specified.  Fixes bug 78751.



svn path=/branches/mono-1-1-13/mono/; revision=62677
  • Loading branch information
dickp committed Jul 17, 2006
1 parent dbf9e2e commit 92c0423
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions mono/io-layer/ChangeLog
@@ -1,3 +1,8 @@
2006-07-17 Dick Porter <dick@ximian.com>

* processes.c (CreateProcess): Don't change directory unless a new
one has been specified. Fixes bug 78751.

2006-07-06 Dick Porter <dick@ximian.com>

* io.c (_wapi_stat_to_file_attributes): Do a better job at
Expand Down
6 changes: 2 additions & 4 deletions mono/io-layer/processes.c
Expand Up @@ -420,8 +420,6 @@ gboolean CreateProcess (const gunichar2 *appname, const gunichar2 *cmdline,
dir[i] = '/';
}
}
} else {
dir = g_get_current_dir ();
}


Expand Down Expand Up @@ -766,7 +764,7 @@ gboolean CreateProcess (const gunichar2 *appname, const gunichar2 *cmdline,

#ifdef DEBUG
g_message ("%s: exec()ing [%s] in dir [%s]", __func__, cmd,
dir);
dir==NULL?".":dir);
for (i = 0; argv[i] != NULL; i++) {
g_message ("arg %d: [%s]", i, argv[i]);
}
Expand All @@ -777,7 +775,7 @@ gboolean CreateProcess (const gunichar2 *appname, const gunichar2 *cmdline,
#endif

/* set cwd */
if (chdir (dir) == -1) {
if (dir != NULL && chdir (dir) == -1) {
/* set error */
_exit (-1);
}
Expand Down

0 comments on commit 92c0423

Please sign in to comment.