From: Robert Swiecki Date: Mon, 17 Feb 2020 13:11:58 +0000 (+0100) Subject: subproc: debug log when hotting SIHQUIT (Ctrl+\) X-Git-Tag: 3.0~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0b941565d27f13865d27f4b903dba3862ef5bc4;p=platform%2Fupstream%2Fnsjail.git subproc: debug log when hotting SIHQUIT (Ctrl+\) --- diff --git a/subproc.cc b/subproc.cc index 730a586..8894d2b 100644 --- a/subproc.cc +++ b/subproc.cc @@ -248,8 +248,9 @@ void displayProc(nsjconf_t* nsjconf) { for (const auto& pid : nsjconf->pids) { time_t diff = now - pid.second.start; uint64_t left = nsjconf->tlimit ? nsjconf->tlimit - (uint64_t)diff : 0; - LOG_I("pid=%d, Remote host: %s, Run time: %ld sec. (time left: %" PRId64 " sec.)", - pid.first, pid.second.remote_txt.c_str(), (long)diff, left); + LOG_I("pid=%d, Remote host: %s, Run time: %ld sec. (time left: %s s.)", pid.first, + pid.second.remote_txt.c_str(), (long)diff, + left == 0 ? "unlimited" : std::to_string(left).c_str()); } }