delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/19/15:41:39

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3DC3FF95C367D411B47E00D0B73E4B38F80847@ap3expr8applge.appl.ge.com>
From: "Lehr, Matt (GEA, 510425)" <MATT DOT LEHR AT APPL DOT GE DOT COM>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: Cygwin Perl system() Invokes exec() Directly?
Date: Wed, 19 Sep 2001 15:40:21 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)

------_=_NextPart_000_01C14142.EB17B150
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C14142.EB17B150"


------_=_NextPart_001_01C14142.EB17B150
Content-Type: text/plain;
	charset="iso-8859-1"

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


------_=_NextPart_001_01C14142.EB17B150
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2654.19">
<TITLE>Cygwin Perl system() Invokes exec() Directly?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hello,</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Seems like =
the Cygwin perl system() function calls exec() directly rather than =
passing the command to the shell?</FONT></P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>For =
example:</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Under =
Cygwin perl:</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>/usr/bin/perl =
-e '$x=3Dsystem(&quot;wc &lt; .bashrc&quot;);print&quot;$x =
$!\n&quot;;'</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>produces =
the output:</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>-1 No such =
file or directory</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Under =
ActiveState perl:</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>/cygdrive/e/Perl/bin/perl -e '$x=3Dsystem(&quot;wc &lt; =
.bashrc&quot;);print&quot;$x $!\n&quot;;'</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>produces =
the output (as expected):</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 93</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>0</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Thanks for =
your efforts...&nbsp; Version information appears below...</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>- Matt</FONT>
</P>

<P><FONT FACE=3D"Arial" SIZE=3D2 COLOR=3D"#000000"></FONT>&nbsp;

</BODY>
</HTML>
------_=_NextPart_001_01C14142.EB17B150--

------_=_NextPart_000_01C14142.EB17B150
Content-Type: application/octet-stream;
	name="cygcheck.out"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="cygcheck.out"

=0A=
Cygnus Win95/NT Configuration Diagnostics=0A=
Current System Time: Wed Sep 19 15:18:39 2001=0A=
=0A=
WinNT Ver 4.0 build 1381 Service Pack 5=0A=
=0A=
Path:	/usr/local/bin=0A=
	/usr/bin=0A=
	/bin=0A=
	/cygdrive/c/WINNT/system32=0A=
	/cygdrive/c/WINNT=0A=
	/cygdrive/c/DMI/bin=0A=
	/cygdrive/c/NETMANAG.32=0A=
	/cygdrive/c/WINNT/System32/WBEM=0A=
	/cygdrive/c/WINNT/system32/nls=0A=
	/cygdrive/c/WINNT/system32/nls/English=0A=
	/cygdrive/z=0A=
	/cygdrive/w/W31=0A=
	/cygdrive/k/O7.16/BIN=0A=
	/cygdrive/k/O7.32/BIN=0A=
	Z=0A=
	.=0A=
	/cygdrive/c/Program Files/DevStudio/Vss/WIN32=0A=
=0A=
SysDir: C:\WINNT\System32=0A=
WinDir: C:\WINNT=0A=
=0A=
PWD =3D `/home/Administrator'=0A=
USER =3D `Administrator'=0A=
MAKE_MODE =3D `unix'=0A=
HOME =3D `/home/Administrator'=0A=
=0A=
NUMBER_OF_PROCESSORS =3D `1'=0A=
PROMPT =3D `$P$G'=0A=
LOGONSERVER =3D `\\AP3PC01APPLGE'=0A=
BASELINE =3D `$/Engineering/Edison Development Team/Edison/04 =
Implementation/01 Design Guidance/Source Code/Prototype'=0A=
OS2LIBPATH =3D `C:\WINNT\system32\os2\dll;'=0A=
COMSPEC =3D `C:\WINNT\system32\cmd.exe'=0A=
NWLANGUAGE =3D `ENGLISH'=0A=
SYSTEMDRIVE =3D `C:'=0A=
HOSTNAME =3D `NT101991APPLGE'=0A=
PROCESSOR_REVISION =3D `080a'=0A=
LOGIN_NAME =3D `L510425'=0A=
_USR =3D `M:'=0A=
PATHEXT =3D `.COM;.EXE;.BAT;.CMD'=0A=
COMPUTERNAME =3D `NT101991APPLGE'=0A=
!E: =3D `E:\cygwin\bin'=0A=
WINDIR =3D `C:\WINNT'=0A=
USERPROFILE =3D `C:\WINNT\Profiles\l510425'=0A=
!S: =3D `S:\'=0A=
PS1 =3D `\[=1B]0;\w=07\w\[=1B[0m$=1B[32m\] '=0A=
HOMESHARE =3D `\\ap1fs01\users'=0A=
SMS_LOCAL_DIR_USER =3D `C:\WINNT'=0A=
VISUAL =3D `emacs'=0A=
MACHTYPE =3D `i686-pc-cygwin'=0A=
!H: =3D `H:\'=0A=
PC_MODEL =3D `DELL_GX110'=0A=
PROCESSOR_IDENTIFIER =3D `x86 Family 6 Model 8 Stepping 10, =
GenuineIntel'=0A=
WIN32DMIPATH =3D `C:\DMI\'=0A=
_SYSD =3D `H:'=0A=
OS =3D `Windows_NT'=0A=
VIEWER =3D `emacs'=0A=
OLDPWD =3D `/usr/bin'=0A=
PROCESSOR_ARCHITECTURE =3D `x86'=0A=
TEMP =3D `/cygdrive/c/TEMP'=0A=
EDITOR =3D `emacs'=0A=
!W: =3D `W:\'=0A=
PROCESSOR_LEVEL =3D `6'=0A=
SYSTEMROOT =3D `C:\WINNT'=0A=
NWUSERNAME =3D `L510425'=0A=
LOCCODE =3D `AP1'=0A=
TMP =3D `/cygdrive/c/TEMP'=0A=
WINDOWS_LOGIN =3D `0'=0A=
HOMEDRIVE =3D `\\'=0A=
SDC_SERVER =3D `AP3SDCV1APPLGE'=0A=
!K: =3D `K:\'=0A=
SHLVL =3D `1'=0A=
F_SERVER =3D `AP1DS01'=0A=
HOMEPATH =3D `ap1fs01\users\l510425'=0A=
USERDOMAIN =3D `USERSAPPLGE'=0A=
!L: =3D `L:\'=0A=
CD_ROM =3D `F:'=0A=
!Z: =3D `Z:\'=0A=
USERNAME =3D `L510425'=0A=
SHELL =3D `/bin/bash'=0A=
!M: =3D `M:\Start Menu\PROGRAMS\Cygnus Solutions'=0A=
HOSTTYPE =3D `i686'=0A=
OSTYPE =3D `cygwin'=0A=
TERM =3D `cygwin'=0A=
UPDATE_SERVER =3D `AP1BC01APPLGE'=0A=
!N: =3D `N:\'=0A=
TOOL_DRV =3D `W:'=0A=
_ =3D `/usr/bin/cygcheck'=0A=
TZ =3D `EST5EDT4,M4.1.0/2,M10.5.0/2'=0A=
=0A=
HKEY_CURRENT_USER\Software\Cygnus Solutions=0A=
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin=0A=
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2=0A=
  (default) =3D `/cygdrive'=0A=
  cygdrive flags =3D 0x00000022=0A=
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/=0A=
  (default) =3D `E:/cygwin'=0A=
  flags =3D 0x00000002=0A=
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts =
v2\/usr/bin=0A=
  (default) =3D `E:/cygwin/bin'=0A=
  flags =3D 0x00000002=0A=
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts =
v2\/usr/lib=0A=
  (default) =3D `E:/cygwin/lib'=0A=
  flags =3D 0x00000002=0A=
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options=0A=
=0A=
a:  fd  FAT        1Mb  39% CP    UN           PKBACK# 001=0A=
c:  hd  NTFS    7804Mb  16% CP CS UN PA FC     =0A=
d:  hd  FAT     4000Mb   2% CP    UN           =0A=
e:  hd  FAT     4094Mb  15% CP    UN           =0A=
f:  cd           N/A    N/A                    =0A=
h:  net NWFS    2051Mb  36% CP                 SYS=0A=
k:  net NWFS   67399Mb  91% CP                 USERS=0A=
l:  net NWFS   67399Mb  91% CP                 USERS=0A=
m:  net NWFS   67399Mb  91% CP                 USERS=0A=
n:  net NWFS   67399Mb  91% CP                 USERS=0A=
s:  net NWFS   67399Mb  91% CP                 USERS=0A=
t:  net NWFS    5000Mb  53% CP                 APPS=0A=
w:  net NWFS   67399Mb  91% CP                 USERS=0A=
z:  net NWFS    2051Mb  36% CP                 SYS=0A=
=0A=
E:\cygwin\bin  /usr/bin  user    binmode=0A=
E:\cygwin\lib  /usr/lib  user    binmode=0A=
E:\cygwin  /        user    binmode=0A=
c:    /cygdrive/c  user    binmode,noumount=0A=
d:    /cygdrive/d  user    binmode,noumount=0A=
e:    /cygdrive/e  user    binmode,noumount=0A=
h:    /cygdrive/h  user    binmode,noumount=0A=
k:    /cygdrive/k  user    binmode,noumount=0A=
l:    /cygdrive/l  user    binmode,noumount=0A=
m:    /cygdrive/m  user    binmode,noumount=0A=
n:    /cygdrive/n  user    binmode,noumount=0A=
s:    /cygdrive/s  user    binmode,noumount=0A=
t:    /cygdrive/t  user    binmode,noumount=0A=
w:    /cygdrive/w  user    binmode,noumount=0A=
z:    /cygdrive/z  user    binmode,noumount=0A=
=0A=
Found: E:\cygwin\bin\bash.exe=0A=
Found: E:\cygwin\bin\cat.exe=0A=
Not Found: cpp (good!)=0A=
Found: E:\cygwin\bin\find.exe=0A=
Not Found: gcc=0A=
Not Found: gdb=0A=
Found: E:\cygwin\bin\ld.exe=0A=
Found: E:\cygwin\bin\ls.exe=0A=
Found: z:\\ls.exe=0A=
Warning: E:\cygwin\bin\ls.exe hides z:\\ls.exe=0A=
Not Found: make=0A=
Not Found: sh=0A=
=0A=
  701k 2001/09/13 E:\cygwin\bin\cygwin1.dll - os=3D4.0 img=3D1.0 =
sys=3D4.0=0A=
                  "cygwin1.dll" v0.0 ts=3D2001/9/12 23:54=0A=
    Cygwin DLL version info:=0A=
        dll major: 1003=0A=
        dll minor: 3=0A=
        dll epoch: 19=0A=
        dll bad signal mask: 19005=0A=
        dll old termios: 5=0A=
        dll malloc env: 28=0A=
        api major: 0=0A=
        api minor: 46=0A=
        shared data: 3=0A=
        dll identifier: cygwin1=0A=
        mount registry: 2=0A=
        cygnus registry name: Cygnus Solutions=0A=
        cygwin registry name: Cygwin=0A=
        program options name: Program Options=0A=
        cygwin mount registry name: mounts v2=0A=
        cygdrive flags: cygdrive flags=0A=
        cygdrive prefix: cygdrive prefix=0A=
        cygdrive default prefix: =0A=
        build date: Wed Sep 12 23:54:31 EDT 2001=0A=
        shared id: cygwin1S3=0A=
=0A=
Use -h to see help about each section=0A=


------_=_NextPart_000_01C14142.EB17B150
Content-Type: text/plain; charset=us-ascii

--
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/
------_=_NextPart_000_01C14142.EB17B150--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019