ptrace: call wait only if PTRACE_SEIZE was successful
ptrace: call wait only if PTRACE_SEIZE was successful

and print errno for the wait syscall in an error case

Signed-off-by: Andrey Vagin <74c05afa918858348d6db8037d82fa8124870113@openvz.org>
Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>

eabatalov/criu,gonkulator/criu,marcosnils/criu,wtf42/criu,tych0/criu,efiop/criu,gonkulator/criu,rentzsch/criu,rentzsch/criu,ldu4/criu,biddyweb/criu,ldu4/criu,svloyso/criu,LK4D4/criu,marcosnils/criu,rentzsch/criu,gonkulator/criu,ldu4/criu,sdgdsffdsfff/criu,KKoukiou/criu-remote,wtf42/criu,wtf42/criu,fbocharov/criu,efiop/criu,wtf42/criu,ldu4/criu,AuthenticEshkinKot/criu,fbocharov/criu,sdgdsffdsfff/criu,eabatalov/criu,KKoukiou/criu-remote,biddyweb/criu,fbocharov/criu,AuthenticEshkinKot/criu,KKoukiou/criu-remote,sdgdsffdsfff/criu,tych0/criu,tych0/criu,eabatalov/criu,sdgdsffdsfff/criu,rentzsch/criu,LK4D4/criu,eabatalov/criu,gablg1/criu,marcosnils/criu,svloyso/criu,fbocharov/criu,LK4D4/criu,marcosnils/criu,eabatalov/criu,wtf42/criu,efiop/criu,efiop/criu,AuthenticEshkinKot/criu,gonkulator/criu,ldu4/criu,ldu4/criu,rentzsch/criu,efiop/criu,gablg1/criu,KKoukiou/criu-remote,gonkulator/criu,wtf42/criu,tych0/criu,marcosnils/criu,AuthenticEshkinKot/criu,KKoukiou/criu-remote,AuthenticEshkinKot/criu,fbocharov/criu,biddyweb/criu,svloyso/criu,gablg1/criu,sdgdsffdsfff/criu,efiop/criu,gablg1/criu,rentzsch/criu,tych0/criu,svloyso/criu,LK4D4/criu,biddyweb/criu,sdgdsffdsfff/criu,biddyweb/criu,LK4D4/criu,tych0/criu,marcosnils/criu,svloyso/criu,gablg1/criu,LK4D4/criu,fbocharov/criu,KKoukiou/criu-remote,svloyso/criu,biddyweb/criu,AuthenticEshkinKot/criu,gonkulator/criu,eabatalov/criu,gablg1/criu