make stat return an zero'd struct, and be a FIFO again... This is only

to fix libc_r since it requires stat to close fd's, and so commented in
the code...

PR:		threads/75795
Reviewed by:	ps
MFC after:	1 week
This commit is contained in:
John-Mark Gurney 2005-05-24 23:42:50 +00:00
parent 701fabc74b
commit b633f50dd8

View File

@ -1365,7 +1365,16 @@ kqueue_stat(struct file *fp, struct stat *st, struct ucred *active_cred,
struct thread *td)
{
return (ENXIO);
bzero((void *)st, sizeof *st);
/*
* We no longer return kq_count because the unlocked value is useless.
* If you spent all this time getting the count, why not spend your
* syscall better by calling kevent?
*
* XXX - This is needed for libc_r.
*/
st->st_mode = S_IFIFO;
return (0);
}
/*ARGSUSED*/