summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2011-12-15 06:25:19 +0000
committerfjoe <fjoe@FreeBSD.org>2011-12-15 06:25:19 +0000
commitdfa5fc70dbb385b497ec595331a54ec893f198c2 (patch)
treebb5c68642b1970355b99d25ae8b40335ca0ed332 /usr.bin
parent53c115f8386607e4f042c7dfa1124f842e373218 (diff)
downloadFreeBSD-src-dfa5fc70dbb385b497ec595331a54ec893f198c2.zip
FreeBSD-src-dfa5fc70dbb385b497ec595331a54ec893f198c2.tar.gz
Revert r228521: sometimes job output is lost
(see tools/regression/usr.bin/make/execution/joberr test). openpty(fd + 0, fd + 1,...) version does not have this problem but it sometimes enters an infinite sleep in "ttywait" state in tty_drain() when make(1) closes slave pty.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/Makefile2
-rw-r--r--usr.bin/make/job.c10
2 files changed, 2 insertions, 10 deletions
diff --git a/usr.bin/make/Makefile b/usr.bin/make/Makefile
index 773f5e3..2dc7e583 100644
--- a/usr.bin/make/Makefile
+++ b/usr.bin/make/Makefile
@@ -7,8 +7,6 @@ CFLAGS+=-I${.CURDIR}
SRCS= arch.c buf.c cond.c dir.c for.c hash.c hash_tables.c job.c \
lst.c main.c make.c parse.c proc.c shell.c str.c suff.c targ.c \
util.c var.c
-DPADD= ${LIBUTIL}
-LDADD= -lutil
NO_SHARED?= YES
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 179306f..75f7949 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -115,7 +115,6 @@ __FBSDID("$FreeBSD$");
#include <fcntl.h>
#include <inttypes.h>
#include <limits.h>
-#include <libutil.h>
#include <paths.h>
#include <string.h>
#include <signal.h>
@@ -1799,13 +1798,8 @@ JobStart(GNode *gn, int flags, Job *previous)
if (usePipes) {
int fd[2];
- if (isatty(1)) {
- if (openpty(fd + 1, fd + 0, NULL, NULL, NULL) == -1)
- Punt("Cannot open pty: %s", strerror(errno));
- } else {
- if (pipe(fd) == -1)
- Punt("Cannot create pipe: %s", strerror(errno));
- }
+ if (pipe(fd) == -1)
+ Punt("Cannot create pipe: %s", strerror(errno));
job->inPipe = fd[0];
job->outPipe = fd[1];
fcntl(job->inPipe, F_SETFD, 1);
OpenPOWER on IntegriCloud