that is an errno to pass up to the calling system call instead. test
case is "who < /dev/null", via ttyname().
-/* $OpenBSD: sys_generic.c,v 1.106 2015/10/09 05:55:58 deraadt Exp $ */
+/* $OpenBSD: sys_generic.c,v 1.107 2015/10/11 23:13:02 deraadt Exp $ */
/* $NetBSD: sys_generic.c,v 1.24 1996/03/29 00:25:32 cgd Exp $ */
/*
error = pledge_ioctl_check(p, com, fp);
if (error)
- return (pledge_fail(p, EPERM, PLEDGE_IOCTL));
+ return (error);
if (fp == NULL)
return (EBADF);