PERL PERL5 PORTERS 35 WHY DOES ZSH HATE PERL OR VICE VERSA
Subject: why does zsh hate Perl, or vice versa?
Date: 19 Feb 2005 09:43:50 -0800

From: merlyn@no-spam (Randal L. Schwartz)

system("zsh") fires up a child zsh just fine. But when the zsh exits, the Perl process is suspended!

Repeat by:

prompt$ perl print "one: "; <STDIN>;
system "zsh";
print "two: "; <STDIN>;
^D one: foo <<<=== I typed "foo"
subprompt$ date <<<=== this is the subshell Sat Feb 19 09:39:19 PST 2005
subprompt$ exit two: zsh: suspended (tty input) perl prompt$ fg <<<=== note we came back to outer shell prompt!
[1] + continued perl bar <<<=== note the print worked, wasn't hung until read prompt$

Is it a problem with zsh, or system(), or some complex interaction?

-- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@no-spam> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


Subject: Re: why does zsh hate Perl, or vice versa?
Date: Sat, 19 Feb 2005 16:20:21 -0500

From: garry@no-spam (Garry Williams)
On Sat, 2005-02-19 at 15:48 -0500, Rick Delaney wrote:
> On Sat, Feb 19, 2005 at 09:43:50AM -0800, Randal L. Schwartz wrote:

[snip]

> > Is it a problem with zsh, or system(), or some complex interaction?
> > Probably zsh; I don't see that. Does the same thing happen for you from > a shell script? What does setopt show?

I can't reproduce this with zsh 4.2.0 on Mandrake 10.1 (perl v5.8.5
built for i386-linux-thread-multi) or zsh 3.1.9 on Solaris 8 (perl v5.8.6 built for sun4-solaris).

-- Garry Williams, Zvolve Systems, Inc., +1 770 813-4934
Cell: +1 404 353-2983


Subject: Re: why does zsh hate Perl, or vice versa?
Date: 19 Feb 2005 16:05:38 -0800

From: merlyn@no-spam (Randal L. Schwartz)
>>>>> "Yuval" == Yuval Kogman <nothingmuch@no-spam> writes:

Yuval> I can reproduce it on macosx with bleadperl and zsh --version eq Yuval> "zsh 4.1.1 (powerpc-apple-darwin7.0)".

Ahh, didn't know the platform would be the problem.

Yes, this is OSX.

-- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@no-spam> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!