Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pierre Muller <muller@cerbere.u-strasbg.fr>
To: gdb-patches@sources.redhat.com
Subject: [RFA] apply shell fix for win32-nat.c in 5.2 branch
Date: Mon, 08 Apr 2002 08:37:00 -0000	[thread overview]
Message-ID: <4.2.0.58.20020408173511.01e73da8@ics.u-strasbg.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 670 bytes --]


This patch was applied previoulsy to the main branch by
Christopher Faylor.

It disables shell use unless explicitly enabled.
As shell use is still experimental and has several 
problems, I think that this must also be applied to 
5.2 branch.

As Christopher asked me to do this, the 
RFA is mainly about the format of the 
ChangeLog entry...


ChangeLog entry:

2002-04-08  Pierre Muller  <muller@ics.u-strasbg.fr>

	from 2002-03-22  Christopher Faylor  <cgf@redhat.com> patch in main branch.
	* win32-nat.c (child_create_inferior): Check for proper shell to use here, in
	case the user changes it on the fly.
	(_initialize_inftarg): Remove shell path considerations.

[-- Attachment #2: win32-nat.diff2 --]
[-- Type: text/plain, Size: 1445 bytes --]

Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.56
diff -r1.56 win32-nat.c
126c126,127
< static DWORD main_thread_id;	/* Thread ID of the main thread */
---
> static DWORD main_thread_id;		/* Thread ID of the main thread */
> static pid_t cygwin_pid;		/* pid of cygwin process */
142,144d142
< /* Path to shell */
< static char shell[MAX_PATH + 1];
< 
1463a1462,1463
>   char shell[MAX_PATH + 1]; /* Path to shell */
>   const char *sh;
1471c1471
<   if (!useshell || !shell[0])
---
>   if (!useshell)
1479,1480c1479,1485
<       char *newallargs = alloca (sizeof (" -c 'exec  '") + strlen (exec_file)
< 				 + strlen (allargs) + 2);
---
>       char *newallargs;
>       sh = getenv ("SHELL");
>       if (!sh)
> 	sh = "/bin/sh";
>       cygwin_conv_to_win32_path (sh, shell);
>       newallargs = alloca (sizeof (" -c 'exec  '") + strlen (exec_file)
> 			   + strlen (allargs) + 2);
1500c1505
<     /* This code use to assume all env vars were file names and would
---
>     /* This code used to assume all env vars were file names and would
1816d1820
<   const char *sh;
1823,1836d1826
< 
<   sh = getenv ("SHELL");
<   if (!sh)
<     sh = "/bin/sh";
<   if (access (sh, X_OK) != 0)
<     {
<       shell[0] = '\0';
<       useshell = 0;
<     }
<   else
<     {
<       cygwin_conv_to_win32_path (sh, shell);
<       useshell = 1;
<     }

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]



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

             reply	other threads:[~2002-04-08 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-08  8:37 Pierre Muller [this message]
2002-04-08 16:08 ` Christopher Faylor
2002-04-09  1:44   ` Pierre Muller
2002-04-09  3:06     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.2.0.58.20020408173511.01e73da8@ics.u-strasbg.fr \
    --to=muller@cerbere.u-strasbg.fr \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox