aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pc/ChangeLog5
-rw-r--r--pc/gawkmisc.pc15
2 files changed, 19 insertions, 1 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 72d5a68f..ee9deca2 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkmisc.pc (execvp): New function based on code from Eli
+ Zaretskii to make dgawk's restarting the debugger work.
+
2012-01-27 Scott Deifik <scottd.mail@sbcglobal.net>
* Makefile.tst: Sync with mainline version.
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__