]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
utils: Add strerror(errno) to error message
authorColin Walters <walters@verbum.org>
Fri, 7 Dec 2012 14:08:21 +0000 (09:08 -0500)
committerRay Strode <rstrode@redhat.com>
Tue, 11 Dec 2012 19:41:30 +0000 (14:41 -0500)
So it's easier to debug why it fails.

src/libply/ply-utils.c

index 5a79bb4dec0be75acc4bededf1c3f7f537188217..ed9219c277f7d6815264d0e506c9a9a6850312bd 100644 (file)
@@ -795,11 +795,12 @@ ply_create_daemon (void)
 
       if (!ply_read (receiver_fd, &byte, sizeof (uint8_t)))
         {
+          int read_error = errno;
           int status;
 
           if (waitpid (pid, &status, WNOHANG) <= 0)
             {
-              ply_error ("failed to read status from child immediately after starting to daemonize");
+              ply_error ("failed to read status from child immediately after starting to daemonize: %s", strerror (read_error));
             }
           else if (WIFEXITED (status))
             {