summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-01-12 01:30:55 (GMT)
committerGuido van Rossum <guido@python.org>1996-01-12 01:30:55 (GMT)
commitc7fea2feedd240127f7c8d7da6e5dde02688e56c (patch)
tree6b80c68676259bfe9e0a94dca2cbf3c30a7c0ddd
parentd8b49250e9bf5ee9ffee6db55a166a2ba3fa8c61 (diff)
downloadcpython-c7fea2feedd240127f7c8d7da6e5dde02688e56c.zip
cpython-c7fea2feedd240127f7c8d7da6e5dde02688e56c.tar.gz
cpython-c7fea2feedd240127f7c8d7da6e5dde02688e56c.tar.bz2
add sigrelse() call for SunOS 4.1; add some fflush() calls
-rw-r--r--Parser/myreadline.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Parser/myreadline.c b/Parser/myreadline.c
index 28008db..dd00077 100644
--- a/Parser/myreadline.c
+++ b/Parser/myreadline.c
@@ -117,6 +117,10 @@ my_readline(prompt)
}
old_inthandler = signal(SIGINT, onintr);
if (setjmp(jbuf)) {
+#ifdef HAVE_SIGRELSE
+ /* This seems necessary on SunOS 4.1 (Rasmus Hahn) */
+ sigrelse(SIGINT);
+#endif
signal(SIGINT, old_inthandler);
return NULL;
}
@@ -140,8 +144,10 @@ my_readline(prompt)
n = 100;
if ((p = malloc(n)) == NULL)
return NULL;
+ fflush(stdout);
if (prompt)
fprintf(stderr, "%s", prompt);
+ fflush(stderr);
switch (my_fgets(p, n, stdin)) {
case 0: /* Normal case */
break;