[CRIU] [RFC PATCH] util: shutdown log in cr_system_userns if error fd is negative

Andrew Vagin avagin at virtuozzo.com
Fri Apr 22 09:21:08 PDT 2016


On Fri, Apr 22, 2016 at 05:37:40PM +0300, Pavel Emelyanov wrote:
> On 04/22/2016 04:58 PM, Stanislav Kinsburskiy wrote:
> > 
> > 
> > 22.04.2016 15:53, Pavel Emelyanov пишет:
> >> On 04/22/2016 01:20 PM, Stanislav Kinsburskiy wrote:
> >>> Otherwise error in case of exec error won't be printed
> >>> The problem is that when err fd is negative, it's replaced by log fd.
> >>> Then err is moved to STDERR (that means, that log_fd is _closed_).
> >> Why, log fd is service fd, not STDERR one.
> > 
> > Not sure I got it correctly.
> > There is an error message below the mentioned hunk:
> > 
> > pr_perror("exec failed");
> > 
> > In case err_fd is passes as "-1", this message will be never printed.
> > Because:
> > 1) err = log_fd();
> > 2) err copied to STDERR and then closed (log_fd is actually closed)
> > 
> > Then in case of error criu tries to write to log_fd, because its service 
> > fd bit is still set ===> Write fails.
> 
> Ah, I see. Patch applied, thanks.

Pls, don't commit patches which fails validation

https://zdtm.openvz.org/series/26/

> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list