Hello
I am using the following program, with the aim of running external binary
(in place of "sleep 500"). The problem is that after issuing
*Runtime.execForWrite,
*the control does not wait till the end of this command, which is not what
I want. Can you suggest a way, so that I can make control wait till
the  *Runtime.execForWrite("Command")
*waits till end of *  Command. *Thanks.
===============================================
*import x10.io.Console;
import x10.lang.Runtime;

public class CheckForBlockingCommand {

  public static def main(Array[String]) {
    val TIMES: int = 10;
    for(var k: Int =0; k< TIMES; k++) {
    Console.OUT.println(" I am launching "+ k);
    Runtime.execForWrite("sleep 500");
    }
      Console.OUT.println("Done!" );
  }
}
*


Thanks and Regards
Sparsh Mittal



On Tue, Dec 18, 2012 at 7:46 PM, Josh Milthorpe
<[email protected]>wrote:

>  Hi,
>
> try Runtime.execForRead(...) / Runtime.execForWrite(...) .   For Native
> X10, they are wrappers around C popen.
>
> http://x10.sourceforge.net/x10doc/latest/index.html?x10/lang/Runtime.html
>
> Cheers,
>
> Josh
>
>
> On 18/12/12 23:50, Sparsh Mittal wrote:
>
> Hello
> I am new to X10. I wanted to ask, "How to call external program (binary)
> in X10", something like *system *in C.
>  I searched pguide.pdf, but could not find answer to this question.
>
> Thanks in advance.
> Thanks and Regards
> Sparsh Mittal
>
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue 
> delivershttp://p.sf.net/sfu/logmein_12329d2d
>
>
>
> _______________________________________________
> X10-users mailing 
> [email protected]https://lists.sourceforge.net/lists/listinfo/x10-users
>
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> X10-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/x10-users
>
>
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to