Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Jason B

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Wait for other process to finish

   1  
   2  # There's another process you want to wait on.  In this example,
   3  # you know the pid, and it's contained in the file $PID_FILE.
   4  while ps -p `cat $PID_FILE` > /dev/null; do sleep 1; done
   5  
   6  # Now you can continue knowing that process has finished...
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS