Complete the internal “100 task” roadmap: coreutils and shell parity (xargs,
sh, diff/patch, sort, printf, find, test, getfacl/setfacl/xattr), expanded /proc and metrics (process table, syscalls, replication, net, security posture, worker budget, swarm/replication hints), initd DAG supervision metadata and richer restart journal telemetry, synthetic process groups via IPC (assignProcessGroup/signalProcessGroup) mirrored into process_table, optional kernel.ext.d incremental hot reload (BARE_OS_KERNEL_EXT_D_HOT_RELOAD) with reload audit NDJSON, features proc for hyperblobs dedup and systemd subset documentation, vault threat model doc plus posture fields for AEAD, Pear enclave pointer, account rotation continuity, and Ed25519 consistency across boot manifest / extensions / replication. Adds or extends tests and keeps kernel/ and packages/bare-os-seeder/kernel/ in parity; guest init is bundled from kernel/lib/init/init-main.js via bundle-kernel-init.
This commit is contained in:
@@ -1700,7 +1700,23 @@ function scheduleBackgroundShell(ctx, toks) {
|
||||
ctx.shellBackgroundJobs = { nextId: 1, list: [] }
|
||||
}
|
||||
if (!ctx.shellSessionState) {
|
||||
ctx.shellSessionState = { sid: 1, nextPgid: 300 }
|
||||
ctx.shellSessionState = {
|
||||
sid: 1,
|
||||
nextPgid: 300,
|
||||
foregroundPgid: 1,
|
||||
controllingTty: '/dev/console'
|
||||
}
|
||||
} else if (ctx.shellSessionState.foregroundPgid == null) {
|
||||
ctx.shellSessionState.foregroundPgid = ctx.shellSessionState.sid
|
||||
}
|
||||
if (!ctx.shellSessionState.controllingTty) {
|
||||
const fifo =
|
||||
(ctx.env && ctx.env.BARE_OS_SESSION_FIFO) ||
|
||||
(ctx.env && ctx.env.BARE_OS_IPC_SESSION_FIFO) ||
|
||||
''
|
||||
ctx.shellSessionState.controllingTty = fifo
|
||||
? `ipc:${String(fifo).trim()}`
|
||||
: '/dev/console'
|
||||
}
|
||||
const id = ctx.shellBackgroundJobs.nextId++
|
||||
const pgid = ctx.shellSessionState.nextPgid++
|
||||
@@ -2280,8 +2296,27 @@ export async function execShellLine(ctx, line) {
|
||||
*/
|
||||
async function execShellLineInner(ctx, rawTrimmed) {
|
||||
if (!ctx.shellSessionState) {
|
||||
ctx.shellSessionState = { sid: 1, nextPgid: 300 }
|
||||
ctx.shellSessionState = {
|
||||
sid: 1,
|
||||
nextPgid: 300,
|
||||
foregroundPgid: 1,
|
||||
controllingTty: '/dev/console'
|
||||
}
|
||||
} else {
|
||||
if (ctx.shellSessionState.foregroundPgid == null) {
|
||||
ctx.shellSessionState.foregroundPgid = ctx.shellSessionState.sid
|
||||
}
|
||||
if (!ctx.shellSessionState.controllingTty) {
|
||||
const fifo =
|
||||
(ctx.env && ctx.env.BARE_OS_SESSION_FIFO) ||
|
||||
(ctx.env && ctx.env.BARE_OS_IPC_SESSION_FIFO) ||
|
||||
''
|
||||
ctx.shellSessionState.controllingTty = fifo
|
||||
? `ipc:${String(fifo).trim()}`
|
||||
: '/dev/console'
|
||||
}
|
||||
}
|
||||
ctx.shellSessionState.foregroundPgid = ctx.shellSessionState.sid
|
||||
let execLine = rawTrimmed
|
||||
const readL = ctx.readLine
|
||||
if (typeof readL === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user