mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
fix: allow ETX to propagate to bash
This commit is contained in:
parent
08601ae2af
commit
259877b677
@ -200,7 +200,9 @@ export class PreparedCommand {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if ( ! command.no_signal_reader ) {
|
||||||
in_ = new SignalReader({ delegate: in_, sig });
|
in_ = new SignalReader({ delegate: in_, sig });
|
||||||
|
}
|
||||||
|
|
||||||
if ( command.input?.syncLines ) {
|
if ( command.input?.syncLines ) {
|
||||||
in_ = new SyncLinesReader({ delegate: in_ });
|
in_ = new SyncLinesReader({ delegate: in_ });
|
||||||
|
@ -112,6 +112,7 @@ export class EmuCommandProvider {
|
|||||||
name: id,
|
name: id,
|
||||||
path: 'Emulator',
|
path: 'Emulator',
|
||||||
execute: this.execute.bind(this, { id, emu, ctx }),
|
execute: this.execute.bind(this, { id, emu, ctx }),
|
||||||
|
no_signal_reader: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,6 +129,15 @@ export class EmuCommandProvider {
|
|||||||
};
|
};
|
||||||
ctx.shell.addEventListener('signal.window-resize', resize_listener);
|
ctx.shell.addEventListener('signal.window-resize', resize_listener);
|
||||||
|
|
||||||
|
// Note: this won't be triggered because the signal reader is disabled,
|
||||||
|
// but if we ever need to enable it here this might be useful.
|
||||||
|
// ctx.externs.sig.on(signal => {
|
||||||
|
// if ( signal === signals.SIGINT ) emu.postMessage({
|
||||||
|
// $: 'stdin',
|
||||||
|
// data: '\x03', // ETX
|
||||||
|
// });
|
||||||
|
// })
|
||||||
|
|
||||||
// TODO: handle CLOSE -> emu needs to close connection first
|
// TODO: handle CLOSE -> emu needs to close connection first
|
||||||
const app_close_promise = new TeePromise();
|
const app_close_promise = new TeePromise();
|
||||||
const sigint_promise = new TeePromise();
|
const sigint_promise = new TeePromise();
|
||||||
|
Loading…
Reference in New Issue
Block a user