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

Cyrill Gorcunov gorcunov at gmail.com
Sun Jan 13 10:10:18 MSK 2019


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.


More information about the CRIU mailing list