This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Cygwin Perl system() Invokes exec() Directly?
- To: cygwin at cygwin dot com
- Subject: Re: Cygwin Perl system() Invokes exec() Directly?
- From: Christopher Faylor <cgf at redhat dot com>
- Date: Wed, 19 Sep 2001 17:19:11 -0400
- Cc: matt dot lehr at appl dot ge dot com
- References: <3DC3FF95C367D411B47E00D0B73E4B38F80848@ap3expr8applge.appl.ge.com>
- Reply-To: cygwin at cygwin dot com
On Wed, Sep 19, 2001 at 05:10:52PM -0400, Lehr, Matt (GEA, 510425) wrote:
> That was quick...
>
>>What is your perl summary (perl-V)?
>
> Please see attached...
>
>>What is pwd?
>
> Hey, you've at least got to give me credit for not falling into that
>trap... :-)
>
> /usr/bin/perl -e '$x=system("wc",".bashrc");$y=system("wc <
>.bashrc");print"$x $y $!\n";'
> produces
> 5 14 93 .bashrc
> 0 -1 No such file or directory
How about the trap of not having 'wc' in your path? Try explicitly using
/bin/wc in the above example.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/