Deleted Added
full compact
svr4_fcntl.c (101709) svr4_fcntl.c (102003)
1/*
2 * Copyright (c) 1998 Mark Newton
3 * Copyright (c) 1994, 1997 Christos Zoulas.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
1/*
2 * Copyright (c) 1998 Mark Newton
3 * Copyright (c) 1994, 1997 Christos Zoulas.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * $FreeBSD: head/sys/compat/svr4/svr4_fcntl.c 101709 2002-08-12 01:42:21Z rwatson $
31 * $FreeBSD: head/sys/compat/svr4/svr4_fcntl.c 102003 2002-08-17 02:36:16Z rwatson $
32 */
33
34#include "opt_mac.h"
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/file.h>
39#include <sys/filedesc.h>

--- 354 unchanged lines hidden (view full) ---

394 /*
395 * we may have lost a race the above open() and
396 * another thread issuing a close()
397 */
398 if (error)
399 return (EBADF); /* XXX: correct errno? */
400 /* ignore any error, just give it a try */
401 if (fp->f_type == DTYPE_VNODE)
32 */
33
34#include "opt_mac.h"
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/file.h>
39#include <sys/filedesc.h>

--- 354 unchanged lines hidden (view full) ---

394 /*
395 * we may have lost a race the above open() and
396 * another thread issuing a close()
397 */
398 if (error)
399 return (EBADF); /* XXX: correct errno? */
400 /* ignore any error, just give it a try */
401 if (fp->f_type == DTYPE_VNODE)
402 fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, td);
402 fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, td->td_ucred,
403 td);
403 fdrop(fp, td);
404 } else {
405 PROC_UNLOCK(p);
406 }
407#else
408 }
409 PROC_UNLOCK(p);
410#endif

--- 338 unchanged lines hidden ---
404 fdrop(fp, td);
405 } else {
406 PROC_UNLOCK(p);
407 }
408#else
409 }
410 PROC_UNLOCK(p);
411#endif

--- 338 unchanged lines hidden ---