Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: Perl TK on Win32

by HamNRye (Monk)
on May 10, 2001 at 23:06 UTC ( [id://79600]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Perl TK on Win32
in thread Perl TK on Win32

Looked at the Chatterbox Client, and I assunme that this is the sub you are talking about:

###################################################################### +########## # # closeDOSParent # # Closes the dos prompt that created this process # sub closeDOSParent { # This just simply doesn't work. I'm not sure why. return; return if ($opt_debug); # debugging info goes to STDOUT! if ($^O =~ /MSWin32/i) { my($process); my($program) = $^X; $orig_params =~ s/\-c\S*\b//g; my($pgm) = "perl $0 $orig_params"; eval ' use Win32::Process; Win32::Process::Create($process,"$program","$pgm",0,DETACHED_PRO +CESS,".") || die Win32::FormatMessage(Win32::GetLastError()) . "\n"; '; exit; } }

I'm not looking to close the DOS window that started my process, but trying to avoid the console windows popping up when doing an "rsh" from the program. They close again immediately, but having 6-7 windows popping into the foreground evey minute is a pain.

I'll look into the Win32::Process docs and see if I can figure out anything....

Replies are listed 'Best First'.
Re: Re: Re: Perl TK on Win32
by idnopheq (Chaplain) on May 10, 2001 at 23:15 UTC
    Another thought I just had while waiting for the pizza delivery man was "Can you daemon-ize it?" ... maybe Win32::Daemon is an approach, pass the service instructions, then kill the service when the app closes?

    I have no real idea if this will even work, but my blood sugar is low ...

    HTH
    --
    idnopheq
    Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.

Re: Re: Re: Perl TK on Win32
by the_slycer (Chaplain) on May 10, 2001 at 23:56 UTC
    I'm not looking to close the DOS window that started my process

    All this command does is hide the DOS window that $pgm is spawning (so launch rsh with that type of command). Look around on the site, there have been many other questions WRT the same thing, including my own - I have used this solution and it works.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://79600]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.