This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fork() problem


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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]