mirror of
https://github.com/dhil/phd-dissertation
synced 2026-03-13 11:08:25 +00:00
minor code revision.
This commit is contained in:
@@ -161,15 +161,20 @@ fun example4() {
|
|||||||
status(fun() {
|
status(fun() {
|
||||||
var parent = fork();
|
var parent = fork();
|
||||||
(if (parent) su(Alice) else su(Bob));
|
(if (parent) su(Alice) else su(Bob));
|
||||||
echo(whoami () ^^ "> Hello ");
|
echo(whoami() ^^ "> Hello ");
|
||||||
|
interrupt();
|
||||||
|
echo(whoami() ^^ "> Bye ");
|
||||||
interrupt();
|
interrupt();
|
||||||
echo(whoami () ^^ "> Bye ");
|
|
||||||
if (parent) exit(0)
|
if (parent) exit(0)
|
||||||
else {
|
else {
|
||||||
echo(whoami () ^^ "> oops ");
|
|
||||||
var parent = fork();
|
var parent = fork();
|
||||||
(if (parent) su(Root) else exit(1));
|
interrupt();
|
||||||
echo(whoami () ^^ "> !! ")
|
(if (parent) su(Root)
|
||||||
|
else {
|
||||||
|
echo(whoami() ^^ "> oops ");
|
||||||
|
exit(1)
|
||||||
|
});
|
||||||
|
echo(whoami() ^^ "> !! ")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user