Cygwin Perl system() Invokes exec() Directly?
Lehr, Matt (GEA, 510425)
MATT.LEHR@APPL.GE.COM
Wed Sep 19 12:41:00 GMT 2001
Title: Cygwin Perl system() Invokes exec() Directly?
Hello,
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ Seems like the Cygwin perl system() function calls exec() directly rather than passing the command to the shell?
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ For example:
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ Under Cygwin perl:
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ /usr/bin/perl -e '$x=system("wc < .bashrc");print"$x $!\n";'
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ produces the output:
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ -1 No such file or directory
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ Under ActiveState perl:
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ /cygdrive/e/Perl/bin/perl -e '$x=system("wc < .bashrc");print"$x $!\n";'
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ produces the output (as expected):
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ 5ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ 14ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ 93
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ 0
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ Thanks for your efforts...ÃÂ Version information appears below...
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ - Matt
ÃÂ
cygcheck.out
--
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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: text/x-algol68
Size: 5356 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20010919/20082ed9/attachment.bin>
More information about the Cygwin
mailing list