delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/06/30/20:24:09

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Sat, 30 Jun 2001 17:23:14 -0700 (PDT)
Message-Id: <20010630.172314.42414222.Takaaki.Ota@am.sony.com>
To: cygwin AT cygwin DOT com, cgf AT redhat DOT com
Cc: gdb AT sources DOT redhat DOT com
Subject: Re: gdb run < file
From: Tak Ota <Takaaki DOT Ota AT am DOT sony DOT com>
In-Reply-To: <20010630132556.E12695@redhat.com>
References: <20010629165352 DOT B8545 AT redhat DOT com>
<1438-Sat30Jun2001093330+0300-eliz AT is DOT elta DOT co DOT il>
<20010630132556 DOT E12695 AT redhat DOT com>
X-Mailer: Mew version 1.95b126 on Emacs 21.0.103.1 / Mule 5.0 (SAKAKI)
X-Telephone: +1-858-942-3239
X-Fax------: +1-858-942-9142
X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804
Organization: Sony Electronics Inc.
Mime-Version: 1.0

On Sat, 30 Jun 2001 13:25:57 -0400, Christopher Faylor <cgf AT redhat DOT com> wrote:

> Perhaps.  However, implementing this the UNIX way should be relatively
> trivial.  It at least deserves study before we throw in the towel.  This

You are right.

> I really regret not suggesting that the original poster explore the
> "follow fork" solution.  I also forgot to preload the expectation that
> an assignment form was necessary.  That was probably discouraging.

Don't regret.  I think I am doing the right thing.  As I've said
before what I tried first was admittedly a kludge solution.  I am done
with that and now exploring the correct unix way.  This is
experimental (shell is hard coded as "bash") however the mechanism
seems to be working.  I only need to add some more code to figure out
what the user's shell is.

-Tak



*** win32-nat.org.c	Wed Apr 18 13:27:11 2001
--- win32-nat.c	Sat Jun 30 16:51:52 2001
***************
*** 1094,1099 ****
--- 1094,1100 ----
    BOOL ret;
    DWORD flags;
    char *args;
+   char *shell = "bash -c 'exec %s %s'";
  
    if (!exec_file)
      error ("No executable specified, use `target exec'.\n");
***************
*** 1101,1107 ****
    memset (&si, 0, sizeof (si));
    si.cb = sizeof (si);
  
!   cygwin_conv_to_win32_path (exec_file, real_path);
  
    flags = DEBUG_ONLY_THIS_PROCESS;
  
--- 1102,1108 ----
    memset (&si, 0, sizeof (si));
    si.cb = sizeof (si);
  
!   /*cygwin_conv_to_win32_path (exec_file, real_path);*/
  
    flags = DEBUG_ONLY_THIS_PROCESS;
  
***************
*** 1111,1122 ****
    if (new_console)
      flags |= CREATE_NEW_CONSOLE;
  
!   args = alloca (strlen (real_path) + strlen (allargs) + 2);
  
!   strcpy (args, real_path);
! 
!   strcat (args, " ");
!   strcat (args, allargs);
  
    /* Prepare the environment vars for CreateProcess.  */
    {
--- 1112,1120 ----
    if (new_console)
      flags |= CREATE_NEW_CONSOLE;
  
!   args = alloca (strlen(shell) + strlen (exec_file) + strlen (allargs) + 2);
  
!   sprintf(args, shell, exec_file, allargs);
  
    /* Prepare the environment vars for CreateProcess.  */
    {

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019