Skip to content

do not write process.exitCode on exit - #1100

Merged
tdrz merged 4 commits into
mainfrom
tdrz/moreExitCodeFixes
Aug 26, 2026
Merged

do not write process.exitCode on exit#1100
tdrz merged 4 commits into
mainfrom
tdrz/moreExitCodeFixes

Conversation

@tdrz

@tdrz tdrz commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@tdrz
tdrz merged commit c771db3 into main Aug 26, 2026
27 of 31 checks passed
@tdrz
tdrz deleted the tdrz/moreExitCodeFixes branch August 26, 2026 13:40
AntonOfTheWoods added a commit to pgxsinkit/pglite that referenced this pull request Sep 12, 2026
Moved pgx-publish onto upstream/main (0.5.8, ae182ff). The remaining stack
carries only changes still absent upstream: transaction-end sync (plus the
already-closed-transaction completion), the IDBFS durability hardening and
relaxed-concurrency restore, the non-exclusive relaxed-sync latch (scoped),
the opfs-ahp instrumentation, the close() relaxed-sync drain, the BasePGlite
export and the live-query refresh/diff-key fixes.

Dropped: the explicit-zero exit-code restore (0.5.5-pgx.2, and its
changeset). Upstream electric-sql#1087 and electric-sql#1100 removed the process.exitCode
save/restore sites entirely — the engine now reports exit status through
_pgl_setPGliteExitStatus — so the helper had nothing left to restore. Its
version-bump commit is kept as history.

Conflicts re-applied onto the new base:
- pglite.ts close(): kept the hardened structure (transaction/query mutex
  nesting, pending-sync drain, deferred final-sync and close-hook failures,
  closeFs in a finally, no serialize.end()) and replaced the folded electric-sql#1059
  exitCode save/restore with upstream 0.5.8's exit tail — force_exit(0) with
  `this.mod = undefined` in the finally.
- pglite.ts #init(): upstream removed the prevExitCode capture and its
  restore that bracketed the method, so the fork's #cleanupFailedInit,
  #initialSyncFs and #syncToFsStrict now follow a bare closing brace.
- pglite.ts execProtocolRawSync(): upstream's body — the
  _pgl_setPGliteExitStatus(-2) longjmp check and a finally with no exit-code
  restore — plus the fork's #checkSynchronousFsSyncState() prologue.
- packages/pglite/package.json: upstream's rewritten test:bun script kept
  alongside the fork's package name, repository url and publish:pgx:*
  scripts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019muxX7JzHorerHQedWXRoz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant