Return ENOTTY instead of EBADF for ioctls on dead vnodes. This fixes

tcsetpgrp() on controlling terminals that are no longer associated
with the session of the calling process, not to mention ioctl.2.
This commit is contained in:
bde 1998-11-22 09:19:07 +00:00
parent f333cb0cb8
commit 4084e8c5f1
2 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
* $Id: dead_vnops.c,v 1.23 1997/12/15 03:09:44 wollman Exp $
* $Id: dead_vnops.c,v 1.24 1998/08/23 11:43:29 bde Exp $
*/
#include <sys/param.h>
@ -188,7 +188,7 @@ dead_ioctl(ap)
{
if (!chkvnlock(ap->a_vp))
return (EBADF);
return (ENOTTY);
return (VCALL(ap->a_vp, VOFFSET(vop_ioctl), ap));
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
* $Id: dead_vnops.c,v 1.23 1997/12/15 03:09:44 wollman Exp $
* $Id: dead_vnops.c,v 1.24 1998/08/23 11:43:29 bde Exp $
*/
#include <sys/param.h>
@ -188,7 +188,7 @@ dead_ioctl(ap)
{
if (!chkvnlock(ap->a_vp))
return (EBADF);
return (ENOTTY);
return (VCALL(ap->a_vp, VOFFSET(vop_ioctl), ap));
}