Files
plainleaf/server/syscalls/shell.ts
T
2024-02-08 21:12:23 +01:00

16 lines
422 B
TypeScript

import { SysCallMapping } from "../../lib/plugos/system.ts";
import { ShellResponse } from "../../type/rpc.ts";
import { ShellBackend } from "../shell_backend.ts";
export function shellSyscalls(shellBackend: ShellBackend): SysCallMapping {
return {
"shell.run": (
_ctx,
cmd: string,
args: string[],
): Promise<ShellResponse> => {
return shellBackend.handle({ cmd, args });
},
};
}