There was an error while loading. Please reload this page.
1 parent e6ce88e commit d99fc81Copy full SHA for d99fc81
1 file changed
src/pl-trace.c
@@ -1896,6 +1896,15 @@ goal above the local stack top pointer. To avoid problems we just
1896
increment the top pointer to point above the furthest argument.
1897
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1898
1899
+static void
1900
+restoreStandardStreams(void)
1901
+{ if ( PL_thread_self() == 1 && truePrologFlag(PLFLAG_EPILOG) )
1902
+ { restoreStandardStream(SNO_USER_ERROR);
1903
+ restoreStandardStream(SNO_USER_OUTPUT);
1904
+ }
1905
+}
1906
+
1907
1908
static void
1909
helpInterrupt(void)
1910
{ GET_LD
@@ -1955,6 +1964,7 @@ interruptHandler(int sig)
1955
1964
safe = !LD->critical;
1956
1965
#endif /* no async signals; always safe */
1957
1966
1967
+ restoreStandardStreams();
1958
1968
Sreset();
1959
1969
again:
1960
1970
if ( safe )
0 commit comments