subproc: debug log when hotting SIHQUIT (Ctrl+\) #2 - better check
authorRobert Swiecki <robert@swiecki.net>
Mon, 17 Feb 2020 13:13:17 +0000 (14:13 +0100)
committerRobert Swiecki <robert@swiecki.net>
Mon, 17 Feb 2020 13:13:17 +0000 (14:13 +0100)
subproc.cc

index 8894d2ba2987f1c7cc223b14cc60c26f52441cdc..16e2c0ac4c373bca9c9758955097b2d9d9eab806 100644 (file)
@@ -250,7 +250,7 @@ void displayProc(nsjconf_t* nsjconf) {
                uint64_t left = nsjconf->tlimit ? nsjconf->tlimit - (uint64_t)diff : 0;
                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());
+                   nsjconf->tlimit ? std::to_string(left).c_str() : "unlimited");
        }
 }