diff options
Diffstat (limited to 'contrib/less/filename.c')
-rw-r--r-- | contrib/less/filename.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/contrib/less/filename.c b/contrib/less/filename.c index 189ad87f6e91..bfbbfdbead9e 100644 --- a/contrib/less/filename.c +++ b/contrib/less/filename.c @@ -24,7 +24,6 @@ #if MSDOS_COMPILER==DJGPPC #include <glob.h> #include <dir.h> -#include <limits.h> #define _MAX_PATH PATH_MAX #endif #endif @@ -34,6 +33,9 @@ #include <modes.h> #endif #endif +#if OS2 +#include <signal.h> +#endif #if HAVE_STAT #include <sys/stat.h> @@ -878,7 +880,16 @@ close_altfile(altfilename, filename, pipefd) if (secure) return; if (pipefd != NULL) + { +#if OS2 + /* + * The pclose function of OS/2 emx sometimes fails. + * Send SIGINT to the piped process before closing it. + */ + kill(((FILE*)pipefd)->_pid, SIGINT); +#endif pclose((FILE*) pipefd); + } if ((lessclose = lgetenv("LESSCLOSE")) == NULL) return; gfilename = esc_metachars(filename); |