Skip to content

Commit

Permalink
Fix glitch where dinitctl status incorrectly shows "No error"
Browse files Browse the repository at this point in the history
  • Loading branch information
davmac314 committed Feb 9, 2025
1 parent 98655be commit d4f7a7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dinitctl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1640,6 +1640,10 @@ static int service_status(int socknum, cpbuffer_t &rbuffer, const char *service_
case stopped_reason_t::EXECFAILED:
uint16_t launch_stage;
rbuffer.extract((char *)&launch_stage, 4, 2);
if (exit_status == 0) {
// (Protocol version 5+)
exit_status = exit_si_code;
}
cout << " (could not be launched)\n";
cout << " Stage: " << exec_stage_descriptions[launch_stage] << "\n";
cout << " Error: " << strerror(exit_status);
Expand Down

0 comments on commit d4f7a7c

Please sign in to comment.