@ai-ecoverse/slicc-kernel 1.140.2 → 1.140.3

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.
@@ -348,6 +348,9 @@ function isHostname(name2) {
348
348
  function hostnameOf(env) {
349
349
  return isHostname(env.HOSTNAME) ? env.HOSTNAME : DEFAULT_HOSTNAME;
350
350
  }
351
+ function initHostname(init) {
352
+ return isHostname(init.hostname) ? init.hostname : hostnameOf(init.env);
353
+ }
351
354
  function ownNames(hostname) {
352
355
  return [.../* @__PURE__ */ new Set([hostname.toLowerCase(), ...LIBC_HOSTNAMES])];
353
356
  }
@@ -2775,7 +2778,7 @@ var KERNEL_VERSION, OS_RELEASE;
2775
2778
  var init_version = __esm({
2776
2779
  "src/version.ts"() {
2777
2780
  "use strict";
2778
- KERNEL_VERSION = true ? "1.140.2" : "0.0.0-dev";
2781
+ KERNEL_VERSION = true ? "1.140.3" : "0.0.0-dev";
2779
2782
  OS_RELEASE = "6.0.0-slicc";
2780
2783
  }
2781
2784
  });
@@ -6259,7 +6262,7 @@ function kernelWrappers(imports, module, deps) {
6259
6262
  goneCwdGetcwd(imports, fsOf, kernelGlue);
6260
6263
  kernelLink(imports, fsOf, memory, kernelGlue);
6261
6264
  devCreations(imports, fsOf, memory, kernelGlue);
6262
- kernelUname(imports, hostnameOf(init.env), memory, kernelGlue);
6265
+ kernelUname(imports, initHostname(init), memory, kernelGlue);
6263
6266
  wrapImport(
6264
6267
  imports,
6265
6268
  "flock",
@@ -6432,7 +6435,7 @@ async function runWasmProcess(init, port2, deps = {}) {
6432
6435
  streams2.quitting = on;
6433
6436
  });
6434
6437
  atExit = () => streams2.exiting();
6435
- useMounts(running.FS, init.env, true);
6438
+ useMounts(running.FS, { ...init.env, HOSTNAME: initHostname(init) }, true);
6436
6439
  useZeroDevices(running.FS);
6437
6440
  useProcfs(running.FS, sys, init.pid);
6438
6441
  if (init.fork) restoreForkedStreams(running.FS, streams2, init.fork.streams ?? []);
@@ -6470,7 +6473,7 @@ async function runWasmProcess(init, port2, deps = {}) {
6470
6473
  ...callerOwner(running.FS, init)
6471
6474
  });
6472
6475
  running.sliccKernel.http = createHttpKernel(transport);
6473
- running.sliccKernel.hostname = hostnameOf(init.env);
6476
+ running.sliccKernel.hostname = initHostname(init);
6474
6477
  running.sliccKernel.net = createSocketKernel({
6475
6478
  transport,
6476
6479
  Fs: running.FS,