Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google site




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 12-23-2007
porter porter is offline Forum Advisor  
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by matrixmadhan View Post
But again the granularity between sleeping and checking for any log messages is purely experimental and you have to give a random number for that.
You can't use sleep to reliably synchronise between processes, you need to use events and state. In UNIX the the best two events are

(a) a process terminating yielding an exit code

(b) reading of a stream