diff options
author | Karel Zak | 2015-10-09 11:46:49 +0200 |
---|---|---|
committer | Karel Zak | 2015-10-09 11:46:49 +0200 |
commit | 3d6250e96b0041a3cbe2f8dd3e746cca5d6ac121 (patch) | |
tree | 05d7cd907e6e8a0cff0864d5b61770e3d7e63605 /misc-utils/uuidd.c | |
parent | build-sys: use REALTIME_LIBS (diff) | |
download | kernel-qcow2-util-linux-3d6250e96b0041a3cbe2f8dd3e746cca5d6ac121.tar.gz kernel-qcow2-util-linux-3d6250e96b0041a3cbe2f8dd3e746cca5d6ac121.tar.xz kernel-qcow2-util-linux-3d6250e96b0041a3cbe2f8dd3e746cca5d6ac121.zip |
uuidd: add debug message for timeout
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/uuidd.c')
-rw-r--r-- | misc-utils/uuidd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index 4e9eb53cd..4b5bf00e9 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -324,7 +324,7 @@ static void server_loop(const char *socket_path, const char *pidfile_path, int s = 0; int fd_pidfile = -1; int ret; - struct pollfd pfd[2]; + struct pollfd pfd[2]; sigset_t sigmask; int sigfd; enum { @@ -421,8 +421,11 @@ static void server_loop(const char *socket_path, const char *pidfile_path, warn(_("poll failed")); all_done(uuidd_cxt, EXIT_FAILURE); } - if (ret == 0) /* truen when poll() times out */ + if (ret == 0) { /* truen when poll() times out */ + if (uuidd_cxt->debug) + fprintf(stderr, _("timeout [%d sec]\n"), uuidd_cxt->timeout), all_done(uuidd_cxt, EXIT_SUCCESS); + } if (pfd[POLLFD_SIGNAL].revents != 0) handle_signal(uuidd_cxt, sigfd); if (pfd[POLLFD_SOCKET].revents == 0) |