@ai-ecoverse/slicc-kernel 1.125.9 → 1.125.10

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
@@ -4340,6 +4340,17 @@ var S_IFIFO = 4096;
4340
4340
  var PERM_MASK = 4095;
4341
4341
  var S_ISGID3 = 1024;
4342
4342
  var READ_ATTEMPTS = 3;
4343
+ async function swapped(op) {
4344
+ for (let attempt = 1; ; attempt++) {
4345
+ try {
4346
+ return await op();
4347
+ } catch (err) {
4348
+ if (err?.name !== "NotFoundError" || attempt >= READ_ATTEMPTS) {
4349
+ throw err;
4350
+ }
4351
+ }
4352
+ }
4353
+ }
4343
4354
  var MAX_LINKS5 = 40;
4344
4355
  var CHECK_MS = 1e3;
4345
4356
  var ABSENT_MS = 2;
@@ -5121,10 +5132,14 @@ var OpfsFs = class {
5121
5132
  return { ...stat, ...ownOf(meta) ?? inherit(entries) };
5122
5133
  }
5123
5134
  stat(path) {
5124
- return this.unreplaced(async () => this.describe(await this.located(path, true)));
5135
+ return this.unreplaced(
5136
+ () => swapped(async () => this.describe(await this.located(path, true)))
5137
+ );
5125
5138
  }
5126
5139
  lstat(path) {
5127
- return this.unreplaced(async () => this.describe(await this.located(path, false)));
5140
+ return this.unreplaced(
5141
+ () => swapped(async () => this.describe(await this.located(path, false)))
5142
+ );
5128
5143
  }
5129
5144
  async exists(path) {
5130
5145
  return this.locate(path, true).then(
@@ -5150,8 +5165,17 @@ var OpfsFs = class {
5150
5165
  }
5151
5166
  reading(path, op) {
5152
5167
  return this.unreplaced(async () => {
5153
- const handle = await this.existing(path);
5154
- return this.retrying(path, () => op(handle), false);
5168
+ for (let attempt = 1; ; attempt++) {
5169
+ const found = await this.locate(path, true);
5170
+ const handle = found.handle;
5171
+ if (handle.kind === "directory") throw fsError("EISDIR", path);
5172
+ try {
5173
+ return await this.retrying(path, () => op(handle), false);
5174
+ } catch (err) {
5175
+ if (err.code !== "ENOENT" || attempt >= READ_ATTEMPTS) throw err;
5176
+ this.files.delete(found.path);
5177
+ }
5178
+ }
5155
5179
  });
5156
5180
  }
5157
5181
  async existing(path, writing = false) {
@@ -5655,10 +5679,10 @@ var OpfsFs = class {
5655
5679
  }));
5656
5680
  }
5657
5681
  async utimes(path, atime, mtime) {
5658
- await this.setTimes(await this.locate(path, true), atime, mtime);
5682
+ await swapped(async () => this.setTimes(await this.locate(path, true), atime, mtime));
5659
5683
  }
5660
5684
  async lutimes(path, atime, mtime) {
5661
- await this.setTimes(await this.locate(path, false), atime, mtime);
5685
+ await swapped(async () => this.setTimes(await this.locate(path, false), atime, mtime));
5662
5686
  }
5663
5687
  async setTimes(found, atime, mtime) {
5664
5688
  this.refuse(found.path);
@@ -7086,7 +7110,7 @@ function satisfies(version, range2) {
7086
7110
  }
7087
7111
 
7088
7112
  // src/version.ts
7089
- var KERNEL_VERSION = true ? "1.125.9" : "0.0.0-dev";
7113
+ var KERNEL_VERSION = true ? "1.125.10" : "0.0.0-dev";
7090
7114
  var OS_RELEASE = "6.0.0-slicc";
7091
7115
  function procVersion() {
7092
7116
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC