Home   Archive   Permalink



Wait for a file

I have a situation where I want to launch a process (not necessarily REBOL) which, when finished, will create a file. The launching process, which will be in REBOL, will not be able to do it stuff until that file from that launched process comes into existence. Therefore, the launching process, in REBOL, will have to wait until that other process is done or until the resulting file comes into being. Either way would work.    
    
I can see one way to do it. Launch the process, and then go into a loop of, check for the file, wait one second, check for the file wait one second, keep repeating until the file is there, then break out of the loop. But I am wondering if that would be the REBOL-recommended way.    
    
Thank you.

posted by:   Steven White       1-Dec-2016/14:57:53-8:00



That should work, and is probably the easiest method. You could also have the other process send a byte over a network socket connection when it's complete.

posted by:   Nick       1-Dec-2016/22:21:10-8:00