Skip to content

Commit d4e5a87

Browse files
RussWoodroofeChrisJefferson
authored andcommitted
set *errin* isTTY properly in package mode (-p) (#2269)
When running in package mode (-p), as used by xgap, GAP sets *errin* to be the same as *stdin*. It should at the same time set isTTY to be the same as for *stdin*.
1 parent d701402 commit d4e5a87

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/system.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,8 +1935,9 @@ void InitSystem (
19351935
if ( SyWindow ) {
19361936
/* SyLineEdit = 1;
19371937
SyCTRD = 1; */
1938-
syBuf[2].fp = fileno(stdin); syBuf[2].echo = fileno(stdout);
1939-
syBuf[3].fp = fileno(stdout);
1938+
syBuf[2].fp = syBuf[0].fp; syBuf[2].echo = syBuf[0].echo;
1939+
syBuf[2].isTTY = syBuf[0].isTTY;
1940+
syBuf[3].fp = syBuf[1].fp;
19401941
syWinPut( 0, "@p", "1." );
19411942
}
19421943

0 commit comments

Comments
 (0)