1.5.18-1: Crash launching COMMAND.COM (W98)

Ingo Brueckl ib@wupperonline.de
Thu Dec 29 05:08:00 GMT 2005


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/



More information about the Cygwin mailing list