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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I have a windows service issue that I would like some suggestions on a problem that we are seeing. I have a perl program that uses the net::server module that basicly monitors a port. <It waits for someone to open the port to communicate with it and tell it to run different tasks. These tasks are ran using a system("start <cmd>"). One of the tasks that the program will do is to build and package one of our companies products.
use base qw(Net::Server); ... ... MyPackage->run(port => 2000, log_file => ser.log, log_level => 4); and then it does: system("start");
to start a build on the local system.

If you run this as a stand-a-lone process it will open up a msdos window and runs the program in it and you see the output of the script as it goes through the build process.

I then use the serany.exe program to run this program as a service. This works for us as I can now remotely talk to the system using tcp and do not have to log into the system to do a build.

The problem is that when we run this as a service the program is disconected from the console and we no longer get a window that pops up on the conosle.

Is there anyway we can change/replace the "system()" command so that a window will open up on the console with the build output?

In reply to Windows service Question by hdjoe

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-24 02:47 GMT
Find Nodes?
    Voting Booth?

    No recent polls found