Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

So, I figured this one out, and it makes me feel really, really, really stupid.

The script that forks the daemon was fine. Using system from my webapp was fine. The problem lay in how I constructed the command before passing it to system:

my $cmd = '/usr/bin/perl' + . ' /home/username/workspace/Space/bin/start_client_handle +r_daemon.pl' . " $user_no" + . $ENV{IS_TEST} ? ' test' : ''

Staggeringly obvious in retrospect...no parentheses around that last line, so Perl was actually concatenating the first two strings together with $ENV{IS_TEST} and setting $cmd to ' test'.

Anyways, I forgot to check the basics and immediately assumed the problem must lay in some more complex part of the code. Lesson learned (hopefully!).


In reply to Re: Does something in Dancer prevent using the system call? by Riales
in thread Does something in Dancer prevent using the system call? by Riales

Title:
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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-19 21:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found