Saturday, 17 August 2013

another way to verify unix wait is completely finished with process

another way to verify unix wait is completely finished with process

I'm firing off two processes in the background. How can I absolutely
guarantee wait $pid2 $pid3 is working and will wait for completion before
firing off 3.sql? I cannot fire off 3.sql until making sure 2.sql is
completely done. Can someone show me another technique for checking this?
#!/usr/bin/ksh
1.sql
2.sql &
3.sql &
pid2=$!
pid3=$!
wait $pid2 $pid3
4.sql

No comments:

Post a Comment