Add .github/workflows/roar.src
This commit is contained in:
parent
90d3182470
commit
6883b23af6
1 changed files with 26 additions and 0 deletions
26
.github/workflows/roar.src
vendored
Normal file
26
.github/workflows/roar.src
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
use { native_fs, native_exec } from host
|
||||||
|
use { fs } from std
|
||||||
|
|
||||||
|
struct Innitguv {
|
||||||
|
fs: native_fs,
|
||||||
|
exec: native_exec
|
||||||
|
current_pid: i32
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Exec for Innitguv {
|
||||||
|
fn exec(&self, arg0: str, args: vec<str>) [nd, exec, await] -> i32 {
|
||||||
|
let path = arg0
|
||||||
|
let pid = self.exec.exec(path, args)
|
||||||
|
if pid == -1 {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
self.current_pid = pid
|
||||||
|
yield()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Actor for Innitguv {
|
||||||
|
fn recv(&self, msg: Message) [recv, await] {
|
||||||
|
self.exec(msg.path, msg.args)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue