Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
bugfix in fout code
- X-seq: zsh-workers 1689
- From: Zefram <A.Main@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Z Shell workers mailing list)
- Subject: bugfix in fout code
- Date: Wed, 17 Jul 1996 22:17:44 +0100 (BST)
-----BEGIN PGP SIGNED MESSAGE-----
I've been getting mysterious core dumps under SunOS for the past couple
of days, starting, coincidentally, just after I installed pre3. A dump
from a zsh script led to the culprit: SunOS' fflush(), which doesn't
agree with a NULL argument. In this case it *is* a bug to call fflush
with a NULL argument, so here's the solution:
Index: Src/jobs.c
===================================================================
RCS file: /home/zefram/usr/cvsroot/zsh/Src/jobs.c,v
retrieving revision 1.3
diff -c -r1.3 jobs.c
*** jobs.c 1996/07/16 14:26:54 1.3
--- jobs.c 1996/07/17 20:23:37
***************
*** 338,346 ****
putc('\n', fout);
fline = 0;
}
! } else if (doputnl && interact && !synch)
putc('\n', fout);
! fflush(fout);
/* print "(pwd now: foo)" messages */
--- 338,348 ----
putc('\n', fout);
fline = 0;
}
! fflush(fout);
! } else if (doputnl && interact && !synch) {
putc('\n', fout);
! fflush(fout);
! }
/* print "(pwd now: foo)" messages */
-zefram
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
iQCVAwUBMe1MwHD/+HJTpU/hAQF3PAQAgJUStFHCdvqtqdq0qi1H7Q0YV7F/bve7
SxSNS9vyhL+UYv7xcmQ/EG/BEkHnUEWQWokKHJn3AU3DpSbTo/LbP1rpRUbRLn6Q
uymeQcATORdid0Vz+yvOC+cWscxRXutZFrZ/8Wq/3SHVM0jiPsgie82aZTpfXnlm
9n1WHzcYo50=
=pq2T
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author