If you really don't care about it returning, you could just:

<%init>
  ...

  `/my/command args &`;

  ...
</%init>

The backticks will fireoff the process, but the '&' will put it in the
background and leave you alone.

Alfie
--
http://www.Share-House.com.au
FREE Share House Advertising

On Dec 11, 2007 7:51 PM, Raymond Wan <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I'm writing a Mason component which I want it to call another Perl
> script and not return from it.  That is, say I have component A:
>
> * call component B
> * start Perl script C in background
> * call component D
>
> So, I want component A (and the results of B and D) displayed first
> while script C is running.
>
> Unfortunately, I don't have much experience in doing fork/exec in a
> regular Perl script.  But, reading the documentation, I thought an "exec
> ($cmd)" would do the trick.  However, I'm getting this error:
>
> -----
> Error during compilation
> Statement unlikely to be reached <line after the exec ()>.
> (Maybe you meant system() when you said exec()?)
> -----
>
> I found a posting from last year describing this
> (http://marc.info/?l=mason&m=114590348207236&w=2) which seems a bit
> complicated and I haven't yet fully digested yet.  I am just wondering
> if what it says is still valid (for Apache2, mod_perl2, etc.).  Thanks!
>
> Ray
>
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users
>

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to