-/* $OpenBSD: kern_descrip.c,v 1.121 2015/10/16 13:37:43 millert Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.122 2015/10/21 16:09:13 bluhm Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
*retval = ((struct socket *)fp->f_data)->so_pgid;
break;
}
+ if (fp->f_type == DTYPE_PIPE) {
+ *retval = ((struct pipe *)fp->f_data)->pipe_pgid;
+ break;
+ }
error = (*fp->f_ops->fo_ioctl)
(fp, TIOCGPGRP, (caddr_t)&tmp, p);
*retval = -tmp;
so->so_sigeuid = p->p_ucred->cr_uid;
break;
}
+ if (fp->f_type == DTYPE_PIPE) {
+ struct pipe *mpipe = (struct pipe *)fp->f_data;
+
+ mpipe->pipe_pgid = (long)SCARG(uap, arg);
+ break;
+ }
if ((long)SCARG(uap, arg) <= 0) {
SCARG(uap, arg) = (void *)(-(long)SCARG(uap, arg));
} else {