summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-07-03 08:48:22 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-07-03 08:48:22 +0000
commit43f3a585977a34d20e8ab2ac79d39183d1d02103 (patch)
tree49307e79ca0a998f8b93ab2f53dc78fdb3a52988 /Src/utils.c
parent0ddb4fb835d685b5dc71dadc08d5758a28b99439 (diff)
downloadzsh-43f3a585977a34d20e8ab2ac79d39183d1d02103.tar.gz
zsh-43f3a585977a34d20e8ab2ac79d39183d1d02103.tar.xz
zsh-43f3a585977a34d20e8ab2ac79d39183d1d02103.zip
12121: stopmsg in precmd
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/Src/utils.c b/Src/utils.c
index f5242bbaa..955158831 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -644,11 +644,16 @@ preprompt(void)
     /* If a shell function named "precmd" exists, *
      * then execute it.                           */
     if ((prog = getshfunc("precmd")) != &dummy_eprog) {
-	int osc = sfcontext;
+	/*
+	 * Save stopmsg, since user doesn't get a chance to respond
+	 * to a list of jobs generated in precmd.
+	 */
+	int osc = sfcontext, osm = stopmsg;
 
 	sfcontext = SFC_HOOK;
 	doshfunc("precmd", prog, NULL, 0, 1);
 	sfcontext = osc;
+	stopmsg = osm;
     }
     if (errflag)
 	return;
@@ -1316,12 +1321,13 @@ read_poll(int fd, int *readchar, int polltty)
     int ret = 0;
     long mode = -1;
     char c;
-#ifdef FIONREAD
-    int val;
-#endif
 #ifdef HAVE_SELECT
     fd_set foofd;
     struct timeval expire_tv;
+#else
+#ifdef FIONREAD
+    int val;
+#endif
 #endif
 #ifdef HAS_TIO
     struct ttyinfo ti;