[CRIU] [PATCH 3/3] tty: Goto err when fail to unlock master pty

Andrei Vagin avagin at gmail.com
Tue Jan 15 20:43:14 MSK 2019


On Sun, Jan 13, 2019 at 10:10:18AM +0300, Cyrill Gorcunov wrote:
> On Sat, Jan 12, 2019 at 09:18:01PM -0800, Andrei Vagin wrote:
> > On Sat, Nov 17, 2018 at 12:57:28AM +0300, Cyrill Gorcunov wrote:
> > > On Fri, Nov 16, 2018 at 09:28:53PM +0000, Radostin Stoyanov wrote:
> > > > Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
> > > 
> > > Not needed. If unlock failed then futher operations on locked
> > > entry simply fails. (unlock itself will yield an error message
> > > so we will notice)
> > 
> > I don't understand this. Why do we need to do "futher operations" in
> > this case?
> 
> Because pty pair is created in locked state, on which you can't
> do anything, iow it is a first stage of pty restore. Later we
> setup various parameters on the peer, thus we need to unlock
> it first. In case if this action failed we will exit with error
> anytway. The whole series is about code simplification and
> shrinking.

I still don't understand why we should not handle this error...

"code simplification and shrinking" doesn't mean that we don't want to
handle errors...


More information about the CRIU mailing list