Re: kern/188952: read after revoke giving error not eof

看板FB_bugs作者時間11年前 (2014/04/25 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
On Thu, 24 Apr 2014, Justin Cormack wrote: >> Description: > I have this ktrace of revoking a pty device: > ... > 43214 luajit-2.0.2 CALL revoke(0xfebc8) > 43214 luajit-2.0.2 NAMI "/dev/pts/1" > 43214 luajit-2.0.2 RET revoke 0 > 43214 luajit-2.0.2 CALL read(0x4,0xa4170,0x1000) > 43214 luajit-2.0.2 RET read -1 errno 6 Device not configured > > As you can see the revoke succeeds but the read is an error. The man page says: > > The revoke() system call invalidates all current open file descriptors in > the system for the file named by path. Subsequent operations on any such > descriptors fail, with the exceptions that a read() from a character > device file which has been revoked returns a count of zero (end of file), > ... > > So the read should be giving a count of zero not an error according to the docs (this happens eg in NetBSD), although maybe the sentence after is trying to tell me something else. deadfs and devfs still try to return EOF for dead ttys, though devfs still has a comment saying that this is redundant for it (it is obviously not redundant for devfs, since devfs is the only place that sets the flag VV_ISTTY used by deadfs). Bruce _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
文章代碼(AID): #1JML5WJq (FB_bugs)
文章代碼(AID): #1JML5WJq (FB_bugs)