diff options
Diffstat (limited to 'base/gdevpipe.c')
-rw-r--r-- | base/gdevpipe.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/base/gdevpipe.c b/base/gdevpipe.c index a7742e16..b4f2acb1 100644 --- a/base/gdevpipe.c +++ b/base/gdevpipe.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -29,8 +29,14 @@ static int do_pclose(FILE *file) { -#ifndef GS_NO_FILESYSTEM - return pclose(file); +#ifdef GS_NO_FILESYSTEM + return gs_error_ok; +#else + int status = pclose(file); + if (status < 0 || status > 0) + return_error(gs_error_ioerror); + + return gs_error_ok; #endif } @@ -96,10 +102,11 @@ pipe_fopen(gx_io_device * iodev, const char *fname, const char *access, static int pipe_fclose(gx_io_device * iodev, gp_file * file) { -#ifndef GS_NO_FILESYSTEM - gp_fclose(file); -#endif +#ifdef GS_NO_FILESYSTEM return 0; +#else + return gp_fclose(file); +#endif } static int |