Re: backtick behavior

2000-12-18 Thread Reini Urban

Joshua Chamas wrote:
> If you want to make that console go away I believe there is
> something you can do to a windows executable to take away
> the console requirement if it has one, but I can't remember
> off the top of my head.  I would check with the ActiveState
> perl win32 lists.

MSVC: 
  editbin /subsystem:windows  vs. editbin /subsystem:console


this changes just a byte in the exe header.

see also, esp. if you don't have MSVC:
  http://Jenda.McCann.cz/perl/GUIscripts.txt
-- 
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html



RE: backtick behavior

2000-12-18 Thread Rufus . Cable

I'm curious about this, as I did exactly the same under CGI just a couple of
days ago. The console behaviour is different under mod_perl... With regular
CGI, the backticks capture STDOUT with no extra code - the same code in a
mod_perl handler always brings up a console window. I've tried using the
Windows START.EXE /B, and that works also fine under CGI but not mod_perl.
Using system() exhibits the same behaviour...

I'd imagine the main difference is the tied STDIN/OUT under mod_perl? I
don't know much about this yet, though I'll probably continue playing with
it now until I do! :) I've got simple code for the CGI and mod_perl handlers
- email if you want a copy... These are of course *very* silly scripts to
leave running on a server, though! ;)

Rufus.

> -Original Message-
> From: Joshua Chamas [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 16, 2000 12:10 AM
> To: Doug Brewer
> Cc: [EMAIL PROTECTED]
> Subject: Re: backtick behavior
> 
> 
> Doug Brewer wrote:
> > 
> > I am on Win2000. When I run a script containing a backtick 
> call, it behaves
> > differently under mod_perl than when called normally (the 
> backtick code is the
> > same, obviously other parts of the script are different, 
> it's a legitimate
> > perlHandler, etc).
> > 
> > When called under mod_perl, the command console visibly 
> flashes up, and
> > performance is slower. When called normally, a backtick 
> command doesn't cause
> > the window to pop up.
> > 
> 
> On windows, some applications expect there to be a console.
> When you are in a console, none pops up because you already 
> have one.  In modperl mode you see it pop up :(
> 
> If you want to make that console go away I believe there is
> something you can do to a windows executable to take away
> the console requirement if it has one, but I can't remember
> off the top of my head.  I would check with the ActiveState
> perl win32 lists.
> 
> -- Josh
> _
> Joshua Chamas Chamas Enterprises Inc.
> NodeWorks >> free web link monitoring Huntington Beach, CA  USA 
> http://www.nodeworks.com1-714-625-4051
> 



Re: backtick behavior

2000-12-15 Thread Joshua Chamas

Doug Brewer wrote:
> 
> I am on Win2000. When I run a script containing a backtick call, it behaves
> differently under mod_perl than when called normally (the backtick code is the
> same, obviously other parts of the script are different, it's a legitimate
> perlHandler, etc).
> 
> When called under mod_perl, the command console visibly flashes up, and
> performance is slower. When called normally, a backtick command doesn't cause
> the window to pop up.
> 

On windows, some applications expect there to be a console.
When you are in a console, none pops up because you already 
have one.  In modperl mode you see it pop up :(

If you want to make that console go away I believe there is
something you can do to a windows executable to take away
the console requirement if it has one, but I can't remember
off the top of my head.  I would check with the ActiveState
perl win32 lists.

-- Josh
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks >> free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051