diff options
author | Dave Davenport <qball@gmpclient.org> | 2015-07-31 10:21:32 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2015-07-31 10:21:32 +0200 |
commit | 69c75971f38fa9be1c09df4a1dc0cd6003b857a9 (patch) | |
tree | 04583c857952f5b47c605aecc4511cb88aee29ba /source/dialogs/script.c | |
parent | fd8fbbf6c52ac2a9f64b741f6a339e9b9a1baa77 (diff) |
Print error to stderr when fclose fails.
Diffstat (limited to 'source/dialogs/script.c')
-rw-r--r-- | source/dialogs/script.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/dialogs/script.c b/source/dialogs/script.c index f96f0115..69f74837 100644 --- a/source/dialogs/script.c +++ b/source/dialogs/script.c @@ -34,6 +34,7 @@ #include <string.h> #include <ctype.h> #include <assert.h> +#include <errno.h> #include "rofi.h" #include "dialogs/script.h" #include "helper.h" @@ -64,7 +65,9 @@ static char **get_script_output ( const char *command, unsigned int *length ) ( *length )++; } - fclose ( inp ); + if ( fclose ( inp ) != 0 ) { + fprintf ( stderr, "Failed to close stdout off executor script: '%s'\n", strerror ( errno ) ); + } } } return retv; |