Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8b4925 commit c7fea2fCopy full SHA for c7fea2f
1 file changed
Parser/myreadline.c
@@ -117,6 +117,10 @@ my_readline(prompt)
117
}
118
old_inthandler = signal(SIGINT, onintr);
119
if (setjmp(jbuf)) {
120
+#ifdef HAVE_SIGRELSE
121
+ /* This seems necessary on SunOS 4.1 (Rasmus Hahn) */
122
+ sigrelse(SIGINT);
123
+#endif
124
signal(SIGINT, old_inthandler);
125
return NULL;
126
@@ -140,8 +144,10 @@ my_readline(prompt)
140
144
n = 100;
141
145
if ((p = malloc(n)) == NULL)
142
146
147
+ fflush(stdout);
143
148
if (prompt)
149
fprintf(stderr, "%s", prompt);
150
+ fflush(stderr);
151
switch (my_fgets(p, n, stdin)) {
152
case 0: /* Normal case */
153
break;
0 commit comments