$NetBSD: patch-ai,v 1.1 2000/10/07 19:24:15 kim Exp $ According to pipe(2) this pipe was backwards, which caused fdopen(3) to fail immediately. --- programs/irr_submit/pgpchk.c.orig Thu Aug 17 17:57:08 2000 +++ programs/irr_submit/pgpchk.c Sat Oct 7 05:11:56 2000 @@ -120,9 +120,9 @@ /* time to muck around with stdin and stdout... */; pipe(p); if (fork() == 0) { /* Child */ - dup2(p[0], 1); - dup2(p[0], 2); - close(p[1]); + dup2(p[1], 1); + dup2(p[1], 2); + close(p[0]); /* Sample v5 invokation % /usr/local/bin/pgpv --pubring=/irr/etc/.pgp/pubring.pkr \ @@ -152,8 +152,8 @@ /* parent */ regcomp(&pgpkeyidre, pgpkeyid, REG_EXTENDED); - close(p[0]); - if ((pgppipe = fdopen(p[1], "r")) == NULL) { + close(p[1]); + if ((pgppipe = fdopen(p[0], "r")) == NULL) { trace (NORM, tr, "fdopen in PGP decode failed\n"); return (-1); }