Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Feb 2010 10:55:01 -0800
From:      Garrett Cooper <yanefbsd@gmail.com>
To:        Tod McQuillin <devin@spamcop.net>
Cc:        FreeBSD-Hackers <freebsd-hackers@freebsd.org>, Jan Mikkelsen <janm@transactionware.com>
Subject:   Re: read(1) garbage when input redirected from make incorrectly
Message-ID:  <7d6fde3d1002161055l306d493di80a6392574a0f135@mail.gmail.com>
In-Reply-To: <20100217024315.O62495@plexi.pun-pun.prv>
References:  <364299f41002151649y2e4d4120p918759afb1fd8f6c@mail.gmail.com> <7d6fde3d1002151655q184c8a21k8a0c6c07b9b0ae79@mail.gmail.com> <BC288C06-614D-4097-901E-5CBECCCC215F@transactionware.com> <7d6fde3d1002160901r600bb514u4a3219d2e59b16aa@mail.gmail.com> <20100217024315.O62495@plexi.pun-pun.prv>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 16, 2010 at 9:46 AM, Tod McQuillin <devin@spamcop.net> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7d6fde3d1002161055l306d493di80a6392574a0f135>