diff options
Diffstat (limited to 'pc/gawkmisc.pc')
-rw-r--r-- | pc/gawkmisc.pc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc index 64b42396..cb49dcca 100644 --- a/pc/gawkmisc.pc +++ b/pc/gawkmisc.pc @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991 - 2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991 - 2003, 2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Progamming Language. @@ -569,6 +569,19 @@ wctob (wint_t wc) return EOF; } +/* + * On MS-Windows, execvp causes the shell and the re-exec'ed + * dgawk to compete for the keyboard input. + * + * This will need work if we ever need a real version of execvp. + */ +int execvp(const char *file, char *const argv[]) +{ + if (_spawnvp(_P_WAIT, file, (const char * const *)argv) != -1) + exit(EXIT_SUCCESS); + + return 0; +} #endif /* __MINGW32__ */ #ifdef __DJGPP__ |