From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <002b01c47a47$0f5d5ca0$f5fb7d50@SOMA> From: "boyd, rounin" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> References: <7446ba65534f2ff0fd37373855b2b932@9netics.com> Subject: Re: [9fans] rc mystery Date: Wed, 4 Aug 2004 19:18:21 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: d1043506-eacd-11e9-9e20-41e7f4b1d025 order of execution. > term% echo `{date -n && sleep 2} `{sleep 2 && date -n} > 1091636548 1091636548 those two are run in parallel and their outputs are handed to echo as arguments (fork being fast, as it was always meant to be :) > term% cat <{date -n && sleep 2} <{sleep 2 && date -n} > 1091637155 > 1091637158 no, that gives you: cat /fd/m /fd/n and the cat can't read /fd/n until /fd/m is closed. both fd's are pipes to the subshells, so the executional is serialised. eg: brahma% echo <{date -n && sleep 2} <{sleep 2 && date -n} /fd/6 /fd/5 brahma% cat <{date -n && sleep 2} <{sleep 2 && date -n} 1091639796 1091639798