This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] honor new-console and new-group in win32-nat.c
>Actually. Wait. There's a better way to do this. Sorry.
>
>Just get rid of the flags = 0 and move the useshell stuff prior to
>the flags |=. That's what I'd intended to do but muffed the placement
>of the useshell conditionals.
OK I committed this:
2002-02-22 Pierre Muller <muller@ics.u-strasbg.fr>
* win32-nat.c (child_create_inferior): Fix create flags setting bug.
Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.55
diff -u -p -r1.55 win32-nat.c
--- win32-nat.c 2002/02/22 01:35:59 1.55
+++ win32-nat.c 2002/02/22 16:58:40
@@ -1468,14 +1468,6 @@ child_create_inferior (char *exec_file,
memset (&si, 0, sizeof (si));
si.cb = sizeof (si);
- flags = 0;
-
- if (new_group)
- flags |= CREATE_NEW_PROCESS_GROUP;
-
- if (new_console)
- flags |= CREATE_NEW_CONSOLE;
-
if (!useshell || !shell[0])
{
flags = DEBUG_ONLY_THIS_PROCESS;
@@ -1484,12 +1476,19 @@ child_create_inferior (char *exec_file,
}
else
{
- char *newallargs = alloca (sizeof (" -c 'exec '") + strlen (exec_file)
strlen (allargs) + 2);
+ char *newallargs = alloca (sizeof (" -c 'exec '") + strlen (exec_file)
+ + strlen (allargs) + 2);
sprintf (newallargs, " -c 'exec %s %s'", exec_file, allargs);
allargs = newallargs;
toexec = shell;
flags = DEBUG_PROCESS;
}
+
+ if (new_group)
+ flags |= CREATE_NEW_PROCESS_GROUP;
+
+ if (new_console)
+ flags |= CREATE_NEW_CONSOLE;
args = alloca (strlen (toexec) + strlen (allargs) + 2);
strcpy (args, toexec);
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99