newfileops_on_fork_test.c (281432) | newfileops_on_fork_test.c (282067) |
---|---|
1/*- 2 * Copyright (c) 2009 Robert N. M. Watson 3 * All rights reserved. 4 * 5 * This software was developed at the University of Cambridge Computer 6 * Laboratory with support from a grant from Google, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2009 Robert N. M. Watson 3 * All rights reserved. 4 * 5 * This software was developed at the University of Cambridge Computer 6 * Laboratory with support from a grant from Google, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: user/ngie/more-tests/tests/sys/file/newfileops_on_fork_test.c 281432 2015-04-11 10:14:59Z ngie $ | 29 * $FreeBSD: head/tests/sys/file/newfileops_on_fork_test.c 281432 2015-04-11 10:14:59Z ngie $ |
30 */ 31 32/* 33 * When a multi-threaded application calls fork(2) from one thread while 34 * another thread is blocked in accept(2), we prefer that the file descriptor 35 * to be returned by accept(2) not appear in the child process. Test this by 36 * creating a thread blocked in accept(2), then forking a child and seeing if 37 * the fd it would have returned is defined in the child or not. --- 84 unchanged lines hidden --- | 30 */ 31 32/* 33 * When a multi-threaded application calls fork(2) from one thread while 34 * another thread is blocked in accept(2), we prefer that the file descriptor 35 * to be returned by accept(2) not appear in the child process. Test this by 36 * creating a thread blocked in accept(2), then forking a child and seeing if 37 * the fd it would have returned is defined in the child or not. --- 84 unchanged lines hidden --- |