Hey BrowserUK --

I tried $tlist = `start /b tlist`; on XP and it still fires off the tlist window when run from wperl.exe. Just realized, I think I'm seeing the "start" window doing it this way...same problem.

Also, I originally was using Win32::Process::Info but the overhead to fire that up is insane compared to tlist. It seriously takes about 20 times the juice to do this.

I'd like to know how to do this for my own edification so that in the future I can fire off other programs I might shell out to without their windows coming up; however, my goal for this project is to check every 5 seconds or so to see if a program is running.

So if there is a low overhead way to do this, I'd love to know...I've thought I could write some daemon that keeps track of process info that I could connect to and read data from or read a text file from...but this seems like overkill for something so simple. Using Win32::Process::Info it ate 20% of my CPU...tlist took 1% sometimes.

Many thanks for your ideas!
Matt


In reply to Re^2: Hiding programs launched within wperl'd script by mdog
in thread Hiding programs launched within wperl'd script by mdog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.