Paul A. Rubin <[EMAIL PROTECTED]> writes:

> 
> Enrico Forestieri wrote:

[snip]

> > Actually, when I try to execute python through the symlink in a *cmd.exe*
> > I get this kind of requester:
> > 
> >    --------------------------------------------------------
> >   | Sottosistema MS-DOS a 16 bit                         X |
> >   |--------------------------------------------------------|
> >   |                                                        | 
> >   | Prompt dei comandi - c:\cygwin\bin\python.exe          | 
> >   | La CPU NTVDM ha incontrato un'istruzione non valida.   | 
> >   | CS:06ea IP:21f1 OP:65 63 69 66 69                      |
> >                   
> >   | Scegliere "Chiudi" per terminare l'applicazione.       |
> >   |                                                        |
> >   |            ------           ------                     |
> >   |           |Chiudi|         |Ignora|                    |
> >   |            ------           ------                     |
> >    --------------------------------------------------------
> > 
> > saying that the CPU has encountered an invalid instruction, which I took
> > as
> > an indication that the file was not recognized as an executable.
> > The title of the requester refers to the "16 bit MS-DOS subsystem" and I
> > have
> > no idea of what this means.
> 
> Early versions of Windows were built over MS-DOS and ran on processors
> that used 16 bit instructions.  Recent versions are designed for
> processors with 32 bit instructions (hence are frequently referred to as
> "Win32") but retain backward compatibility with 16 bit programs, so as
> not to render older software totally obsolete.  However, that backward
> compatibility is a bit spotty (even by Microsoft standards).  When you
> run a 16 bit program in Win 2K or Win XP, it is actually run by
> something called the "16 bit subsystem".

Thank you for this explanation, Paul.

> I'm surprised, though, that Cygwin's python.exe would be a 16 bit
> executable.  Unfortunately, while I have Cygwin installed on a Win 2K
> server, I don't have python installed.  However, I created symbolic
> links to /cygwin/bin/bash.exe and /cygwin/bin/hostid.exe and had no
> trouble running them from a cmd window.

No I don't think it is. Something strange is happening here. In a rxvt
window I did this:

ef:~> cd /bin
ef:/bin> ln -s bash.exe shell.exe
ef:/bin> ls -lF python* shell*
lrwxrwxrwx  1 ef users   13 May 30 15:21 python.exe -> python2.4.exe*
-rwxr-xr-x  1 ef users 5120 May 28 00:04 python2.4.exe*
lrwxrwxrwx  1 ef users    8 Jun 18 23:40 shell.exe -> bash.exe*

Then I opened a cmd.exe window:

C:\cygwin\bin>dir python*
 Il volume nell'unità C non ha etichetta.
 Numero di serie del volume: 2B69-00E4

 Directory di C:\cygwin\bin

28/05/2005  00.04                5.120 python2.4.exe
               1 File          5.120 byte
               0 Directory   2.663.874.560 byte disponibili


Notice that python.exe doesn't show up, but the symlink to bash.exe is found:


C:\cygwin\bin>dir shell*
 Il volume nell'unità C non ha etichetta.
 Numero di serie del volume: 2B69-00E4

 Directory di C:\cygwin\bin

18/06/2005  23.40                  210 shell.exe.lnk
               1 File            210 byte
               0 Directory   2.663.874.560 byte disponibili

Now:

C:\cygwin\bin>python
[ka-boom, requester shows up]

C:\cygwin\bin>shell
"shell" non è riconosciuto come comando interno o esterno,
 un programma eseguibile o un file batch.

C:\cygwin\bin>shell.exe.lnk

C:\cygwin\bin>bash-2.05b$
C:\cygwin\bin>
bash-2.05b$
C:\cygwin\bin>

where those above are the prompts I obtain by simply hitting return. It
seems that I am switched back and forth between bash and cmd. I had to
close the cmd window to exit such a loop.

However:

C:\cygwin\bin>python.exe.lnk
"python.exe.lnk" non è riconosciuto come comando interno o esterno,
 un programma eseguibile o un file batch.

But:

C:\cygwin\bin>python2.4
Python 2.4.1 (#1, May 27 2005, 18:02:40)
[GCC 3.3.3 (cygwin special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

I am really baffled by this and have no explanation (the python symlink
works perfectly in bash).

> > This is on Win2000, perhaps on WinXP it is
> > different, I don't know.
> 
> Possible but unlikely.
> 

The only thing that comes to my mind is that, though I have Win2000, the
windows partition is FAT32 and not NTFS. I bought this laptop configured
this way and it is ok for me, as when I boot linux I can access read/write
the win partition.

However, I think we are going off topic here.

--
Enrico


Reply via email to