@ai-ecoverse/slicc-kernel 1.60.2 → 1.61.1
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/README.md +2 -2
- package/dist/driver-worker.js.map +2 -2
- package/dist/index.js.map +2 -2
- package/dist/kernel-worker.js +16 -1
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-driver-worker.js.map +2 -2
- package/dist/node-process-worker.js +36 -7
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +16 -1
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +36 -7
- package/dist/process-worker.js.map +2 -2
- package/package.json +2 -2
package/dist/kernel-worker.js
CHANGED
|
@@ -3061,6 +3061,7 @@ function processes(l, self) {
|
|
|
3061
3061
|
const viewer = credOf(self);
|
|
3062
3062
|
return l.list(viewer).map(({ tid: _, cred = viewer, umask: _umask, ...entry }) => ({
|
|
3063
3063
|
...entry,
|
|
3064
|
+
rss: entry.memory,
|
|
3064
3065
|
uid: cred.euid,
|
|
3065
3066
|
gid: cred.egid
|
|
3066
3067
|
}));
|
|
@@ -6265,7 +6266,7 @@ var UnlinkedKeeper = class {
|
|
|
6265
6266
|
async linkedName(hidden) {
|
|
6266
6267
|
if (!mayLink(this.fs, hidden)) return;
|
|
6267
6268
|
const st = await this.fs.lstat(hidden).catch(() => void 0);
|
|
6268
|
-
if (
|
|
6269
|
+
if (st?.nlink === void 0) return;
|
|
6269
6270
|
const id2 = `${st.dev ?? 0}:${st.ino}`;
|
|
6270
6271
|
this.linked.set(hidden, id2);
|
|
6271
6272
|
this.links.set(id2, (this.links.get(id2) ?? 0) + 1);
|
|
@@ -7944,6 +7945,12 @@ async function keptOr(entry, path, handle) {
|
|
|
7944
7945
|
const kept = entry.unlinked?.(path);
|
|
7945
7946
|
return kept && !await entry.fs.exists(path) ? kept.hidden : path;
|
|
7946
7947
|
}
|
|
7948
|
+
async function keptStat(entry, req) {
|
|
7949
|
+
const hidden = entry.keptFor?.(req.handle ?? -1)?.hidden;
|
|
7950
|
+
if (hidden === void 0)
|
|
7951
|
+
return { ok: false, errno: "ENOENT", message: "the handle keeps no file" };
|
|
7952
|
+
return json2(statJson(await entry.fs.stat(hidden)));
|
|
7953
|
+
}
|
|
7947
7954
|
async function owned(entry, own, req, path, target) {
|
|
7948
7955
|
const source = target === path ? void 0 : path;
|
|
7949
7956
|
if (UNLINKING_OPS.has(req.op) && await linkedElsewhere(entry.fs, target, source)) {
|
|
@@ -7958,6 +7965,7 @@ async function dispatchSyncFs(req) {
|
|
|
7958
7965
|
try {
|
|
7959
7966
|
const path = fs.resolvePath(cwd, req.path);
|
|
7960
7967
|
if (req.op === "kept") return json2(entry.keptFor?.(req.handle ?? -1) !== void 0);
|
|
7968
|
+
if (req.op === "stat" && req.handle !== void 0) return await keptStat(entry, req);
|
|
7961
7969
|
if (req.op === "statfs") return json2(await entry.statfs?.(path) ?? await storageUsage());
|
|
7962
7970
|
if (req.op === "hold") {
|
|
7963
7971
|
const [on, open] = [((req.mode ?? 0) & 1) === 1, ((req.mode ?? 0) & 2) === 2];
|
|
@@ -10150,6 +10158,12 @@ var VfsNodes = class {
|
|
|
10150
10158
|
async identify(path) {
|
|
10151
10159
|
return this.byPath.has(path) || !mayLink(this.fs, path) ? void 0 : this.identity(path);
|
|
10152
10160
|
}
|
|
10161
|
+
async flushLinked(path) {
|
|
10162
|
+
if (this.byId.size === 0 || !mayLink(this.fs, path)) return;
|
|
10163
|
+
const id2 = await this.identity(path);
|
|
10164
|
+
const node = id2 === void 0 ? void 0 : this.byId.get(id2);
|
|
10165
|
+
if (node) await node.serial(() => node.flush());
|
|
10166
|
+
}
|
|
10153
10167
|
async linked(from, to) {
|
|
10154
10168
|
const node = this.byPath.get(from);
|
|
10155
10169
|
if (!node || node.orphaned) return;
|
|
@@ -10354,6 +10368,7 @@ function keepingOpen(fs, nodes) {
|
|
|
10354
10368
|
const source = fs.resolvePath("/", from);
|
|
10355
10369
|
const at = await (follow2 ? nodes.targetKey(source) : nodes.entryKey(source));
|
|
10356
10370
|
await nodes.flush(at);
|
|
10371
|
+
await nodes.flushLinked(at);
|
|
10357
10372
|
const key = await nodes.entryKey(fs.resolvePath("/", to));
|
|
10358
10373
|
await nodes.onEntry(key, () => fs.link(from, to, follow2));
|
|
10359
10374
|
await nodes.linked(at, key);
|