Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1407690

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

From Cyrill Gorcunov <gorcunov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data
Date 2016-05-26 21:40 +0200
Message-ID <rD9iq-1Yf-23@gated-at.bofh.it> (permalink)
References <rlhHs-3TE-13@gated-at.bofh.it> <rmCTw-LE-1@gated-at.bofh.it> <rmG14-3kL-15@gated-at.bofh.it> <rmNOW-11s-9@gated-at.bofh.it> <rmRSx-463-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Apr 12, 2016 at 12:42:11AM +0300, Cyrill Gorcunov wrote:
...
> I think so. At least this gives some kind of consistensy while we're
> fetching data. Something close to peeking data from pipes/sockets.
> 
> > In that case, I think just write trylocking the termios rwsem should
> > prevent any parallel i/o, at least for the N_TTY line discipline.
> > 
> > This should only interfere with processes not being dumped because
> > ptrace signalling should have ejected any process to be dumped out
> > of their i/o loops (readers or writers).
> > 
> > Also, I think we should further limit the interface based on what is
> > supported currently; IOW, check that the driver is either pty or vt,
> > assert that the line discipline is N_TTY at both ends, etc.
> 
> Thats a good idea, thanks, will do!

It's almost a month passed, so I'm really sorry for delay in response
(been trying to implement pty c/r on userspace level together with
other stuff). Peter, I believe your initial idea of fetching data
via native read inside criu works well for us so far. We've been
playing with tests and they are passing just fine. Thanks a huge
for all your comments and overall help!

	Cyrill

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to  peek unread data Cyrill Gorcunov <gorcunov@gmail.com> - 2016-05-26 21:40 +0200

csiph-web