From owner-svn-src-all@FreeBSD.ORG Thu Dec 15 06:25:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B12601065675; Thu, 15 Dec 2011 06:25:19 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A01658FC18; Thu, 15 Dec 2011 06:25:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBF6PJYZ032868; Thu, 15 Dec 2011 06:25:19 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBF6PJHg032865; Thu, 15 Dec 2011 06:25:19 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201112150625.pBF6PJHg032865@svn.freebsd.org> From: Max Khon Date: Thu, 15 Dec 2011 06:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228525 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2011 06:25:19 -0000 Author: fjoe Date: Thu Dec 15 06:25:19 2011 New Revision: 228525 URL: http://svn.freebsd.org/changeset/base/228525 Log: 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. Modified: head/usr.bin/make/Makefile head/usr.bin/make/job.c Modified: head/usr.bin/make/Makefile ============================================================================== --- head/usr.bin/make/Makefile Thu Dec 15 06:12:43 2011 (r228524) +++ head/usr.bin/make/Makefile Thu Dec 15 06:25:19 2011 (r228525) @@ -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 Modified: head/usr.bin/make/job.c ============================================================================== --- head/usr.bin/make/job.c Thu Dec 15 06:12:43 2011 (r228524) +++ head/usr.bin/make/job.c Thu Dec 15 06:25:19 2011 (r228525) @@ -115,7 +115,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -1799,13 +1798,8 @@ JobStart(GNode *gn, int flags, Job *prev 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);