dinitctl: fix display of termination signal
authorDavin McCall <davmac@davmac.org>
Sat, 25 May 2019 23:38:12 +0000 (09:38 +1000)
committerDavin McCall <davmac@davmac.org>
Sat, 25 May 2019 23:38:12 +0000 (09:38 +1000)
src/dinitctl.cc

index d0f9c154f983aa898a8f5e2394dfae11beed530c..dbccc7d6dde1b5c6901397500dbdb95c56cc60b8 100644 (file)
@@ -758,7 +758,7 @@ static int list_services(int socknum, cpbuffer_t &rbuffer)
                 cout << " (exit status: " << WEXITSTATUS(exit_status) << ")";
             }
             else if (WIFSIGNALED(exit_status)) {
-                cout << " (signal: " << WSTOPSIG(exit_status) << ")";
+                cout << " (signal: " << WTERMSIG(exit_status) << ")";
             }
         }