Skip to content

Commit

Permalink
nspawn: add a hint to the message we emit when a child dies
Browse files Browse the repository at this point in the history
From #10526:

$ sudo systemd-nspawn -i image
Spawning container image on /home/zbyszek/src/mkosi/image.
Press ^] three times within 1s to kill container.
Short read while reading cgroup mode.
  • Loading branch information
keszybz committed Nov 13, 2018
1 parent 8724def commit bd897e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nspawn/nspawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3862,7 +3862,8 @@ static int run(int master,
if (l < 0)
return log_error_errno(errno, "Failed to read cgroup mode: %m");
if (l != sizeof(arg_unified_cgroup_hierarchy)) {
log_error("Short read while reading cgroup mode.");
log_error("Short read while reading cgroup mode (%zu bytes).%s",
l, l == 0 ? " The child is most likely dead." : "");
return -EIO;
}
}
Expand Down

0 comments on commit bd897e7

Please sign in to comment.