- initial changes to data shapes
- ls command needs fixing
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { CommandDescriptor } from "@core/command";
|
||||
import type { ShellState } from "@core/shell_state";
|
||||
import type { Signal } from "@core/signal";
|
||||
import { SIGNAL_MAP, type Signal } from "@core/signal";
|
||||
import { EventEmitter } from "./event_emitter";
|
||||
import { Process } from "./process";
|
||||
import type { ShellEventMap } from "./shell";
|
||||
@@ -11,9 +11,9 @@ export class ProcessManager {
|
||||
|
||||
private _EventEmitter: EventEmitter<ShellEventMap> = new EventEmitter();
|
||||
|
||||
public createProcess(state: ShellState, descriptor: CommandDescriptor, flags: string[], args: string[]): number {
|
||||
public createProcess(state: ShellState, descriptor: CommandDescriptor, args: string[]): number {
|
||||
const pid = ++this._PIDIndex;
|
||||
const process = new Process(pid, state, descriptor, flags, args);
|
||||
const process = new Process(pid, state, descriptor, args);
|
||||
this._Processes.set(pid, process);
|
||||
|
||||
process.on("stdout", payload => this._EventEmitter.emit("stdout", payload));
|
||||
@@ -51,7 +51,7 @@ export class ProcessManager {
|
||||
}
|
||||
|
||||
//Make global signals an enum later
|
||||
process.sendSignal({ type: "SIGKILL" } satisfies Signal);
|
||||
process.sendSignal({ type: SIGNAL_MAP.SIGKILL } satisfies Signal);
|
||||
}
|
||||
|
||||
public on<K extends keyof ShellEventMap>(type: K, handler: (payload: ShellEventMap[K]) => void): () => void {
|
||||
|
||||
Reference in New Issue
Block a user