delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/28/22:08:41

X-Spam-Check-By: sourceware.org
From: ib AT wupperonline DOT de (Ingo Brueckl)
Date: Thu, 29 Dec 2005 04:07:00 +0100
Subject: Re: 1.5.18-1: Crash launching COMMAND.COM (W98)
Message-ID: <43b35194@wupperonline.de>
In-Reply-To: <1125870155.32392.ezmlm@cygwin.com> <431BFA1D.5040903@cs.yale.edu> <20050905174859.GB3621@trixie.casa.cgf.cx> <431CA835.5060502@cs.yale.edu> <431CA98A.5070806@byu.net> <431CACC0.3060009@cs.yale.edu>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Mon, 05 Sep 2005, Sean Gugler wrote:

> Score!  Snapshot 20050905 did the trick.

Unfortunately, there is still a crash with:

  #include <stdlib.h>
  #include <unistd.h>
  #include <sys/cygwin.h>
  #include <sys/wait.h>

  int cygwinsystem (const char *cmd)
  {
    pid_t pid;
    int rc;
    static int result;

    if (!(pid = fork()))
    {
      char *com = getenv("COMSPEC");
      if (!com) com = "COMMAND.COM";

      if (cmd) rc = execlp(com, com, "/c", cmd, NULL);
      else rc = execlp(com, com, NULL);

      exit(rc);
    }
    wait(&result);
    return result;
  }

  int main (int argc, char **argv)
  {
    return cygwinsystem(argv[1]);
  }

When calling this program with an argument like 'dir'. The dir listing
appears, but then the program crashes. Tested with latest snapshot 20051227.

Ingo

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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