site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On 16 Sep 2011, at 14:49, ingemar@ragnemalm.se wrote: void RunTest(int i) { int pty; switch(forkpty(&pty, NULL, NULL, NULL)) { case -1: // Error printf("pty error after %d\n", i); exit(1); case 0: // Child _exit(0); default: // Parent close(pty); } One error here: close can be interrupted, so you need int res; do { res = close(pty); } while ((res == -1) && (errno == EINTR)); Jonas _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jonas Maebe