[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools/xenconsoled: Preserve errno while rotating logfile handles
commit a7d4a5904b62731551e366ff62d84759c8ee68e2 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue May 16 14:57:27 2017 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Wed May 17 17:15:07 2017 +0100 tools/xenconsoled: Preserve errno while rotating logfile handles The logic to optionally exit after a poll() error relies on errno, but handle_log_reload() does not preserve it. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> Release-acked-by: Julien Grall <julien.grall@xxxxxxx> --- tools/console/daemon/io.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 7e6a886..7e474bb 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -1117,8 +1117,12 @@ void handle_io(void) ret = poll(fds, nr_fds, next_timeout ? poll_timeout : -1); if (log_reload) { + int saved_errno = errno; + handle_log_reload(); log_reload = 0; + + errno = saved_errno; } /* Abort if poll failed, except for EINTR cases -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |