delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/07/31/20:34:16

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <19990801003028.61496.qmail@hotmail.com>
X-Originating-IP: [209.244.209.101]
From: "unknown user" <jwl1980 AT hotmail DOT com>
To: cygwin AT sourceware DOT cygnus DOT com
Subject: fork() problem
Date: Sat, 31 Jul 1999 20:30:27 EDT
Mime-Version: 1.0

Here's the problem... If I compile the program with this code.. it just 
crashes, but if i comment this out it compiles and runs fine even though 
it's not running as it's suppose to be...

/* some code here*/

switch (fork()) {
    case -1:
      printf("Couldn't run in background, exiting...\n");
      exit(1);
      break;
    case 0:
      break;
    default:
      printf("Running in background...\n");
      exit(0);
      break;
  }
/* other stuff*/


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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