@ai-ecoverse/slicc-kernel 1.125.10 → 1.125.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/node.js CHANGED
@@ -7110,7 +7110,7 @@ function satisfies(version, range2) {
7110
7110
  }
7111
7111
 
7112
7112
  // src/version.ts
7113
- var KERNEL_VERSION = true ? "1.125.10" : "0.0.0-dev";
7113
+ var KERNEL_VERSION = true ? "1.125.11" : "0.0.0-dev";
7114
7114
  var OS_RELEASE = "6.0.0-slicc";
7115
7115
  function procVersion() {
7116
7116
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -19291,6 +19291,7 @@ var MAX_READ = 1024 * 1024;
19291
19291
  var O_NONBLOCK = 2048;
19292
19292
  var WRITE_ACCESS = 3;
19293
19293
  var KEYBOARD = /* @__PURE__ */ new Set([SIG.INT, SIG.QUIT, SIG.TSTP]);
19294
+ var STUCK_ESCAPES = /* @__PURE__ */ new Set([SIG.INT, SIG.TERM, SIG.QUIT, SIG.HUP]);
19294
19295
  var DEFAULT_UMASK2 = 18;
19295
19296
  function words(value2) {
19296
19297
  if (!Array.isArray(value2) || !value2.every((w) => typeof w === "string")) {
@@ -19347,6 +19348,8 @@ var WasmProcess = class {
19347
19348
  cred;
19348
19349
  execChild;
19349
19350
  killed = false;
19351
+ calls = 0;
19352
+ pendingAt = /* @__PURE__ */ new Map();
19350
19353
  execTermsig;
19351
19354
  stopped = 0;
19352
19355
  stops = 0;
@@ -19445,9 +19448,9 @@ var WasmProcess = class {
19445
19448
  const action = defaultAction(sig);
19446
19449
  return action === "stop" ? this.stop(sig) : action;
19447
19450
  }
19448
- if (((this.options.pendingBits?.() ?? 0) & bit) !== 0 && defaultAction(sig) === "terminate") {
19449
- return "terminate";
19450
- }
19451
+ if (((this.options.pendingBits?.() ?? 0) & bit) !== 0) {
19452
+ if (STUCK_ESCAPES.has(sig) && this.pendingAt.get(sig) === this.calls) return "terminate";
19453
+ } else this.pendingAt.set(sig, this.calls);
19451
19454
  this.options.onPending?.(sig);
19452
19455
  if (this.options.jobs?.keyboard && KEYBOARD.has(sig) && this.waiting.size === 0)
19453
19456
  this.owed = true;
@@ -19570,6 +19573,7 @@ var WasmProcess = class {
19570
19573
  }
19571
19574
  async syscall(req, cancelled, block) {
19572
19575
  this.options.onSyscall?.(req);
19576
+ this.calls += 1;
19573
19577
  const started = performance.now();
19574
19578
  let restarted = false;
19575
19579
  for (; ; ) {