2016-03-12 13:50:43 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cat > test.js << EOF
|
|
|
|
var task = new Task();
|
|
|
|
task.onExit = function() {
|
|
|
|
print("child exited");
|
|
|
|
};
|
|
|
|
task.activate();
|
2021-01-02 13:10:00 -05:00
|
|
|
task.execute({name: "child.js", source: utf8Decode(File.readFile("child.js"))}).then(function() {
|
2016-03-12 13:50:43 -05:00
|
|
|
print("child started");
|
|
|
|
});
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat > child.js << EOF
|
|
|
|
print("I am the child process.");
|
|
|
|
exit(0);
|
|
|
|
EOF
|
|
|
|
|
2016-03-13 09:37:58 -04:00
|
|
|
$TILDEFRIENDS test.js
|