From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 16 18:55:03 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B98E91065670 for ; Tue, 16 Feb 2010 18:55:03 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-px0-f194.google.com (mail-px0-f194.google.com [209.85.216.194]) by mx1.freebsd.org (Postfix) with ESMTP id 829DB8FC23 for ; Tue, 16 Feb 2010 18:55:01 +0000 (UTC) Received: by pxi32 with SMTP id 32so1805134pxi.3 for ; Tue, 16 Feb 2010 10:55:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=L9AAdai/JdCQK+lBhhjmumjlC5XiFg+gTw0ofXQs5Ls=; b=rPxeYoP0+O81F/n6p/Y5bViGcsZiYL9MNGCl65OliwsBDUH7oCfDZSAUxVJcgDn0jy pdDKa5vsNQygQJbe0kznSXwmV2VbbWMrS33rjI7wttnHlVgm78NBTnUmtl/X13DgOyih fX5Nlp1BAweyeaSxYgY1HTKanY8/IBGhikP0o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=QRvQHXsSLAH1c0PDnGtGj86Xc2Am7fC/JEpPvVWNrk1SFsuEvgbvFFKQm5cnJZRgsD ux8B3krODxIiPD6jOZGSqDrV4sUrQ3TVXbb/rlONJwaHNZ8MdrrxWSoSMwomv8tVeDzM YOE/78jg3O9Vr9eZQFRjtGw+8Lek1yhpvt6hA= MIME-Version: 1.0 Received: by 10.142.59.21 with SMTP id h21mr4605694wfa.182.1266346501347; Tue, 16 Feb 2010 10:55:01 -0800 (PST) In-Reply-To: <20100217024315.O62495@plexi.pun-pun.prv> References: <364299f41002151649y2e4d4120p918759afb1fd8f6c@mail.gmail.com> <7d6fde3d1002151655q184c8a21k8a0c6c07b9b0ae79@mail.gmail.com> <7d6fde3d1002160901r600bb514u4a3219d2e59b16aa@mail.gmail.com> <20100217024315.O62495@plexi.pun-pun.prv> Date: Tue, 16 Feb 2010 10:55:01 -0800 Message-ID: <7d6fde3d1002161055l306d493di80a6392574a0f135@mail.gmail.com> From: Garrett Cooper To: Tod McQuillin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD-Hackers , Jan Mikkelsen Subject: Re: read(1) garbage when input redirected from make incorrectly X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 18:55:03 -0000 On Tue, Feb 16, 2010 at 9:46 AM, Tod McQuillin wrote: > On Tue, 16 Feb 2010, Garrett Cooper wrote: > >> [gcooper@optimus ~]$ python -c 'import sys; sys.stdin.read()' < make -V >> bash: make: No such file or directory >> [gcooper@optimus ~]$ perl -e 'while (<>) { print; }' < make -V >> bash: make: No such file or directory > > No, you have to say: > > python -c 'import sys; sys.stdin.read()' < /usr/bin/make > > perl -e 'while (<>) { print; }' < /usr/bin/make -V > > What was happening in your first example is that the actual file > /usr/bin/make on disk is being read directly ... /usr/bin/make is never > executed at all. =A0That is why your hexdump showed an ELF header -- it c= ame > from /usr/bin/make which is an ELF executable. Yeah... nevermind duh. Case closed :P... Thanks! -Garrett