mirror of https://github.com/python/cpython.git
add sigrelse() call for SunOS 4.1; add some fflush() calls
This commit is contained in:
parent
d8b49250e9
commit
c7fea2feed
|
@ -117,6 +117,10 @@ my_readline(prompt)
|
||||||
}
|
}
|
||||||
old_inthandler = signal(SIGINT, onintr);
|
old_inthandler = signal(SIGINT, onintr);
|
||||||
if (setjmp(jbuf)) {
|
if (setjmp(jbuf)) {
|
||||||
|
#ifdef HAVE_SIGRELSE
|
||||||
|
/* This seems necessary on SunOS 4.1 (Rasmus Hahn) */
|
||||||
|
sigrelse(SIGINT);
|
||||||
|
#endif
|
||||||
signal(SIGINT, old_inthandler);
|
signal(SIGINT, old_inthandler);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -140,8 +144,10 @@ my_readline(prompt)
|
||||||
n = 100;
|
n = 100;
|
||||||
if ((p = malloc(n)) == NULL)
|
if ((p = malloc(n)) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
fflush(stdout);
|
||||||
if (prompt)
|
if (prompt)
|
||||||
fprintf(stderr, "%s", prompt);
|
fprintf(stderr, "%s", prompt);
|
||||||
|
fflush(stderr);
|
||||||
switch (my_fgets(p, n, stdin)) {
|
switch (my_fgets(p, n, stdin)) {
|
||||||
case 0: /* Normal case */
|
case 0: /* Normal case */
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue