0

I'm essentially trying to find a Linux compatible version of the .NET solution to the post found here. The goal would be to start a process and have control return to matlab, but also have the ability to continuously check the status of the process to determine when it has finished and if it returns any error codes.

I realize the system command does this but if you add the & at the end to return control back to matlab it returns the exit code and does not update when the process finishes.

Thanks in advance for any help.

4
  • 1
    Did you try the java version in the same answer? Commented May 25, 2016 at 23:45
  • @Daniel I have not, are you thinking that it may work properly on both linux / windows? Ah, it does in fact say it may work on non-Windows systems. I'll give it a try and report back. Commented May 26, 2016 at 16:31
  • 1
    You have to replace the commands in the first two lines, otherwise it works. Commented May 26, 2016 at 16:34
  • @Daniel So I've been able to run some simulations using the Java version from the previous post. But, as soon as I execute the command I get an exit code of 0, then the simulation proceeds to run for 1 hour and after it completes I still get an exit code of 0. I'd like a way to tell if the simulation is running versus when it has finished. Is this possible? The .NET functionality allows this with a HasExited property of the System.Diagnostics.ProcessStartInfo class. Here is a snippet of the important bits PastebinLink Commented May 27, 2016 at 2:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.