Skip to content

Commit 129b5dd

Browse files
committed
Better logging for socket services
"pid 0 exited with 0" is not helpful. Just log "Socket service exited" and let the user use the PID recorded by systemd-journald to correlate that with the service start log.
1 parent cdf92b7 commit 129b5dd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

agent/qrexec-agent-data.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,12 @@ static int handle_new_process_common(
283283

284284
exit_code = process_io(&req);
285285

286-
if (type == MSG_EXEC_CMDLINE)
287-
LOG(INFO, "pid %d exited with %d", pid, exit_code);
286+
if (type == MSG_EXEC_CMDLINE) {
287+
if (pid > 0)
288+
LOG(INFO, "pid %d exited with %d", pid, exit_code);
289+
else
290+
LOG(INFO, "Socket service closed");
291+
}
288292

289293
libvchan_close(data_vchan);
290294
return exit_code;

0 commit comments

Comments
 (0)