[hackers] [ubase] Ensure a proper exit code || sin

From: <git_AT_suckless.org>
Date: Wed, 04 Jun 2014 14:06:50 +0200

commit 144a89326822d55c65997a37ea048622ceb96020
Author: sin <sin_AT_2f30.org>
Date: Wed Jun 4 13:02:07 2014 +0100

    Ensure a proper exit code
    
    If copy() fails at least print stats.

diff --git a/dd.c b/dd.c
index c4db974..9942253 100644
--- a/dd.c
+++ b/dd.c
_AT_@ -263,10 +263,10 @@ main(int argc, char *argv[])
         signal(SIGINT, sig_int);
 
         if (copy(&config) < 0)
- eprintf("copy:");
+ weprintf("copy:");
         print_stat(&config);
 
         if (config.nosync == 0)
                 sync(); sync();
- return EXIT_SUCCESS;
+ return config.saved_errno;
 }
Received on Wed Jun 04 2014 - 14:06:50 CEST

This archive was generated by hypermail 2.3.0 : Wed Jun 04 2014 - 14:12:08 CEST