NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/51886: [PATCH] tests/lib/libpthread/t_fork: use _exit instead of exit



The following reply was made to PR bin/51886; it has been noted by GNATS.

From: "Ngie Cooper (yaneurabeya)" <yaneurabeya%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/51886: [PATCH] tests/lib/libpthread/t_fork: use _exit instead
 of exit
Date: Sun, 15 Jan 2017 13:00:29 -0800

 --Apple-Mail=_9851A9FF-E15E-4196-A011-670EC34FCA49
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 Patch attached.
 -Ngie
 
 --Apple-Mail=_9851A9FF-E15E-4196-A011-670EC34FCA49
 Content-Disposition: attachment;
 	filename=t_fork-various-fixes.patch
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="t_fork-various-fixes.patch"
 Content-Transfer-Encoding: 7bit
 
 Index: lib/libpthread/t_fork.c
 ===================================================================
 RCS file: /cvsroot/src/tests/lib/libpthread/t_fork.c,v
 retrieving revision 1.1
 diff -u -r1.1 t_fork.c
 --- lib/libpthread/t_fork.c	16 Jul 2010 15:42:53 -0000	1.1
 +++ lib/libpthread/t_fork.c	15 Jan 2017 21:00:09 -0000
 @@ -61,7 +61,7 @@
  
  	thread_survived = 1;
  	if (parent != getpid()) {
 -		exit(1);
 +		_exit(1);
  	}
  	return NULL;
  }
 @@ -95,7 +95,7 @@
  		ATF_REQUIRE_EQ_MSG(WEXITSTATUS(status), 0, "thread survived in child");
  	} else {
  		sleep(5);
 -		exit(thread_survived ? 1 : 0);
 +		_exit(thread_survived ? 1 : 0);
  	}
  }
  
 
 --Apple-Mail=_9851A9FF-E15E-4196-A011-670EC34FCA49--
 


Home | Main Index | Thread Index | Old Index