On Mon, Jun 22, 2009 at 5:17 PM, Kamaraju S Kusumanchi<raju.mailingli...@gmail.com> wrote: > proga, progb are completely independent. They take couple of hours to > finish. The time to complete proga, progb are not same. > > progc should to be launched only after both proga, progb are finished. progc > takes another couple of hours to finish.
I've taken to using flock for such things if I'm launching them from other scripts. I forget which package and I can't look right now (my machine died this morning). I think it's like this: flock /path/to/lockfile programtorun --options --to --programtorun I would do something like: flock /path/to/proga /path/to/proga --options_for_a flock /path/to/progb /path/to/progb --options_for_b flock /path/to/proga flock /path/to/progb /path/to/progc --options_for_c That is, use an flock on the program itself as the serialization point. Well, this works when the file I'm locking is a shell script in my ~/bin/ directory. Not so sure if it's a /usr/bin/ type of file without write access. In that case you could always create files in /tmp/ And there may be better ways to lock on multiple files than chaining flock like I did above. Read the man page. mrc -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org