Was trying to use ruby to automate a set of tasks.
In trying to do so I need process2 to start only after process1 is
done.
I am using a code similar to below, but does not seem to work.
I want the process 1f_after to execute after the exec command is done.
So I would expect that the time stamp of "1f_after" is later than the
time stamp of "1f" but does not happen so.
How could I do this?
(process2 & process1 are not necessarily system commands I am trying to
executea part of a cad tool in process1 & 2)
Was trying to use ruby to automate a set of tasks.
In trying to do so I need process2 to start only after process1 is
done.
I am using a code similar to below, but does not seem to work.
I want the process 1f_after to execute after the exec command is done.
So I would expect that the time stamp of "1f_after" is later than the
time stamp of "1f" but does not happen so.
How could I do this?
(process2 & process1 are not necessarily system commands I am trying to
executea part of a cad tool in process1 & 2)
Corey,
When I do so, it does the same thing
I dont think ruby waits for the previous system command to be done
before it runs the next line.
( They are concurrent?)
Ay other ideas of how I would be abel to wait on the previous process
to run the next one?
Snippet shown below.
Thankyou,
Partha
-rw-rw-r-- 1 pvn cad 0 Oct 17 10:27 1f_after
-rw-rw-r-- 1 pvn cad 61261 Oct 17 10:27 1f
Corey,
When I do so, it does the same thing
I dont think ruby waits for the previous system command to be done
before it runs the next line.
( They are concurrent?)
No way: sytem is synchronous, i.e. ruby will block until it has finished. Try it:
Ay other ideas of how I would be abel to wait on the previous process
to run the next one?
If you see something different then maybe the processes you start are forking. For some programs usually started as daemon there's a flag that prevents running in the background. Maybe that can help you.
Other than that, if your programms fork themselfes you need to find a way to determine execution state and wait to that status change.
Snippet shown below.
What exactly do you want to demonstrate with this?
-rw-rw-r-- 1 pvn cad 0 Oct 17 10:27 1f_after
-rw-rw-r-- 1 pvn cad 61261 Oct 17 10:27 1f