Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.bugs.usg Subject: "ed" bug fix Message-ID: <1157@brl-tgr.ARPA> Date: Mon, 2-Sep-85 03:39:39 EDT Article-I.D.: brl-tgr.1157 Posted: Mon Sep 2 03:39:39 1985 Date-Received: Tue, 3-Sep-85 01:40:15 EDT Distribution: net Organization: Ballistic Research Lab Lines: 23 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"); ...