@ai-ecoverse/slicc-kernel 1.147.2 → 1.147.4

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.
@@ -7785,7 +7785,7 @@ function satisfies(version, range2) {
7785
7785
  }
7786
7786
 
7787
7787
  // src/version.ts
7788
- var KERNEL_VERSION = true ? "1.147.2" : "0.0.0-dev";
7788
+ var KERNEL_VERSION = true ? "1.147.4" : "0.0.0-dev";
7789
7789
  var OS_RELEASE = "6.0.0-slicc";
7790
7790
  function procVersion() {
7791
7791
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -30075,6 +30075,25 @@ var Launcher = class {
30075
30075
  const optional = `${root}-names${beside.slice(root.length)}`;
30076
30076
  return await this.base.exists(optional) ? optional : void 0;
30077
30077
  }
30078
+ loaded(target, env, caller) {
30079
+ const read = () => this.program(target, env, caller);
30080
+ const id2 = () => this.exeId(target);
30081
+ return id2().then(
30082
+ (before) => read().then(
30083
+ (first) => id2().then(
30084
+ (after) => after.exeId === before.exeId ? [first, after] : this.reread(target, read).then(
30085
+ (again) => id2().then((last) => [again, last])
30086
+ )
30087
+ )
30088
+ )
30089
+ );
30090
+ }
30091
+ reread(target, read) {
30092
+ for (const key of this.compiled.keys()) {
30093
+ if (key.startsWith(`${target.wasm}:`)) this.compiled.delete(key);
30094
+ }
30095
+ return read();
30096
+ }
30078
30097
  exeId(target) {
30079
30098
  if (target.abi !== "wasi" || (target.copy ?? target.glue) !== target.wasm) {
30080
30099
  return Promise.resolve({});
@@ -30137,7 +30156,7 @@ var Launcher = class {
30137
30156
  try {
30138
30157
  const caller = { pid: req.ppid ?? 0, uid: req.cred.euid, tag: req.tags?.[0] };
30139
30158
  if (this.integrity) await this.checkedSources(planned, caller);
30140
- [program, exeId] = await Promise.all([this.program(target, env, caller), this.exeId(target)]);
30159
+ [program, exeId] = await this.loaded(target, env, caller);
30141
30160
  if (readsEtcHostname(program)) setOrDrop(env, "HOSTNAME", own);
30142
30161
  } catch (err) {
30143
30162
  await req.fds.closeAll();