mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 00:10:10 +00:00
Thu Feb 8 18:55:27 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* hurd/hurdioctl.c (tiocsctty): Set the terminal's pgrp to our own.
This commit is contained in:
parent
a482b5a595
commit
56f778c958
@ -1,3 +1,7 @@
|
|||||||
|
Thu Feb 8 18:55:27 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||||
|
|
||||||
|
* hurd/hurdioctl.c (tiocsctty): Set the terminal's pgrp to our own.
|
||||||
|
|
||||||
Wed Feb 7 18:48:30 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
Wed Feb 7 18:48:30 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||||
|
|
||||||
* Makefile (subdirs): Added wcsmbs.
|
* Makefile (subdirs): Added wcsmbs.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* ioctl commands which must be done in the C library.
|
/* ioctl commands which must be done in the C library.
|
||||||
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
|
Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -126,12 +126,13 @@ fioclex (int fd,
|
|||||||
_HURD_HANDLE_IOCTLS (fioclex, FIOCLEX, FIONCLEX);
|
_HURD_HANDLE_IOCTLS (fioclex, FIOCLEX, FIONCLEX);
|
||||||
|
|
||||||
#include <hurd/term.h>
|
#include <hurd/term.h>
|
||||||
|
#include <hurd/tioctl.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rectty_dtable (mach_port_t cttyid)
|
rectty_dtable (mach_port_t cttyid)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
HURD_CRITICAL_BEGIN;
|
HURD_CRITICAL_BEGIN;
|
||||||
__mutex_lock (&_hurd_dtable_lock);
|
__mutex_lock (&_hurd_dtable_lock);
|
||||||
|
|
||||||
@ -222,6 +223,11 @@ tiocsctty (int fd,
|
|||||||
else if (err)
|
else if (err)
|
||||||
return __hurd_fail (err);
|
return __hurd_fail (err);
|
||||||
|
|
||||||
|
/* Change the terminal's pgrp to ours. */
|
||||||
|
err = HURD_DPORT_USE (fd, __tioctl_tiocspgrp (port, _hurd_pgrp));
|
||||||
|
if (err)
|
||||||
|
return __hurd_fail (err);
|
||||||
|
|
||||||
/* Make it our own. */
|
/* Make it our own. */
|
||||||
_hurd_port_set (&_hurd_ports[INIT_PORT_CTTYID], cttyid);
|
_hurd_port_set (&_hurd_ports[INIT_PORT_CTTYID], cttyid);
|
||||||
|
|
||||||
@ -256,7 +262,7 @@ tiocnotty (int fd,
|
|||||||
_hurd_port_set (&_hurd_ports[INIT_PORT_CTTYID], MACH_PORT_NULL);
|
_hurd_port_set (&_hurd_ports[INIT_PORT_CTTYID], MACH_PORT_NULL);
|
||||||
|
|
||||||
/* Reset all the ctty ports in all the descriptors. */
|
/* Reset all the ctty ports in all the descriptors. */
|
||||||
|
|
||||||
__USEPORT (CTTYID, (rectty_dtable (MACH_PORT_NULL), 0));
|
__USEPORT (CTTYID, (rectty_dtable (MACH_PORT_NULL), 0));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user