gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (09/02/85)
FIX for PROBLEM ID 69 in the UNIX System V Known Problem List
(July 1985):
ABSTRACT: The X option of the "ed" command fails when executed
through a pipe.
As usual, this was some lazy programmer taking a short-cut.
I am posting just enough context to make the fix location clear:
...
char xxxsccsid[] = "@(#)ed.c 1.27";
...
crinit(keyp, permp)
...
int ic, i, j, k, temp, pf[2];
int w; /* DAG -- added for wait bug fix */
...
write(pf[1], buf, 10);
while ((w = wait((int *) 0)) != i && w != -1) /* DAG -- bug fix */
; /* DAG */
if (w == -1 || read(pf[0], buf, 13)!=13) { /* DAG */
puts("crypt: cannot generate key");
...