[Cook] parallel confusion
Peter Miller
millerp at canb.auug.org.au
Wed Jul 16 22:37:49 EST 2003
On Fri, Jun 20, 2003 at 11:07:54PM -0500, Jerry Pendergraft wrote:
> You should try to keep each recipe to a single command. Because multiple
> commands will definately run in different threads, even on different
> machines.
No, all the commands of a recipe body are executed in the same cook
thread (the thread-id will be constant and unique for the duration of
the recipe body execution).
But, yes, each command will be executed as a separate Unix process.
And, yes, every command which needs a shell to run it (because it has
meta-characters to be interpreted) will get another separate Unix
process for each shell instance.
As a result, yes, each command could be executed on a different machine
if you are using the host-binding feature with more than one host named
(or Jerry's clever load balancing).
If you have a recipe body with more than one command in it, you could
(a) quote all but the last semicolon; or
(b) whack it all into a shell script, and have the recipe invoke the
shell scrip.
Either way, all the commands will be one command from Cook's
perspective.
--
Regards
Peter Miller <millerp at canb.auug.org.au>
/\/\* http://www.canb.auug.org.au/~millerp/
PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53 2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.auug.org.au/pipermail/cook-users/attachments/20030716/07184b84/attachment.pgp>
More information about the Cook-users
mailing list