I want the on-demand script to wait a reasonable amount of time (like 60 seconds), and then give up and tell the user. Have inherited this code. Script1 (on demand) invokes Script2 via batch, waits for it to finish, and tells the user the results. The Script2 tells the Script1 when it is finished and sends a status string. Script1 invokes the batch via eval_, then calls the following:
Script2 does this at its end:
I cannot make Script1 give up, it hangs indefinately until Script2 actually finishes. I would have thought the "recv" command, waiting "1" second, should do it. What is this doing wrong? llandale - Wed Feb 11 14:51:38 EST 2015 |
Re: IPC Communication Hmm ... I used a similar code which used to work fine. Cannot spot anything right away. Will try later. Why are you using IPC though? Do the two scripts run on different computers? It seems to me that checking for the existing of a predefined temp file is much more stable, if the processes run on the same computer. I know that blocking has always been a problem with DOORS IPC. You need to be very careful to only call "recv" when you know that data will come in. I tried to use the nonblocking variants with no success. Also only call accept when you know that you will receive a connection. The DXL will be blocked otherwise. Regards, Mathias |