Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 3212

POSIX process pause wait sleep

$
0
0

Hi, there I intend to create a data communication between two processes based on console application mode, i.e. DOS system. the goal is that A process run at first, then pause, send a message to B process, and wait until A process run at first, then pause, send a message to B process, and wait until gets the response from B, and repeat and repeat. B process run   B process run at first, then pause and wait for the message from A. once the message from A arrived, it will carry out the special code, then send the result back to A, and again pause there until it gets the new another message from A.  I had tried SLEEP function, but no idea how to wake up it because the wait time is unpredictable.  Both of  PAUSE and  WAIT seem to kill the process B. But in my program, process B will be kept on running without termination. At present, the SLEEP function seems to be the first favorite if it can be woken up by the message arrival from A. Can anyone know the answer and would like to help me?


Viewing all articles
Browse latest Browse all 3212

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>