Subject: Bash/Perl problem
From: [email-masked] (Richard Donkin)

10 Dec 1996 12:45:02 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Original-To: [email-masked]
Original-Cc: [email-masked]
Original-Sender: [email-masked]

Gnu-Win32 B17 Bash will sometimes compete for input from a Perl/Win32 script 
that has been launched in the foreground and finishes with an exec() - Perl 
launches the exec'ed program, but bash thinks the subprocess has terminated 
and starts trying to read command line input.  

This may well be an artefact of how Perl/Win32 build 110 implements its 
exec() function - under Win95's command.com, the script works fine, so it is 
the interaction of bash and Perl/Win32 that causes the problem.  The problem 
occurred when exec'ing VIM 4.5 for Win32 but I don't think that matters, any 
program that asks for input would do.

I will be passing this on to the Perl/Win32 porters but here it is for the 
record.

To reproduce this, here is the script in cut-down form:

#!/usr/bin/perl

eval 'exec perl -S $0 ${1+"$@"}'
        if 0;

# This line works under bash and command.com:
# system ( "c:\\usr\\local\\bin\\vim.exe", @unixpaths);

# This line under bash provokes error
exec ("c:\\usr\\local\\bin\\vim.exe", @unixpaths);

-------
The problem occurs when running the script as 'perl try' or just 'try' from 
bash.

By the way, for any vi users out there, I really recommend looking at VIM - 
it has online help, multiple windows/buffers, command line history and 
editing, filename completion, etc, but is highly vi compatible.  Emacs users 
can ignore this announcement :)  For more details, see:

VIM home page - <URL:http://www.math.fu-berlin.de/~guckes/vim/>

Richard
--
[email-masked]                http://www.inside-edge.co.uk/
Inside Edge Consultancy           Client/Server and Internet Applications
PGP key from:  [email-masked]  -or-  http://www.four11.com/

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".