Skip to content

plan9 port maintenance#1756

Merged
bakpakin merged 2 commits into
janet-lang:masterfrom
pixelherodev:master
Jun 9, 2026
Merged

plan9 port maintenance#1756
bakpakin merged 2 commits into
janet-lang:masterfrom
pixelherodev:master

Conversation

@pixelherodev

Copy link
Copy Markdown
Contributor

Fixes a few regressions since the port initially landed

@pixelherodev

Copy link
Copy Markdown
Contributor Author

This partly reverts the opaquing of JanetMarshalContext, so cc @iceghost.

I'd like to find a way to fix compilation on plan9 without reverting that, since that seems to be an intentional change?

@iceghost

Copy link
Copy Markdown
Contributor

I thought CI also covers Plan9. I'm not sure how to build for Plan9 yet, but I will take a look when I get home in like 9 hours.

(it would be nice if you could include why it failed, since it is not apparent on the commit diff)

@iceghost

Copy link
Copy Markdown
Contributor

Ah, downloading the ISO from https://9front.org is such a pain in the ass with all the rate limiting on their side. My downloads keep on timing out.

I would recommend putting the compile errors here so people who don't have access to a Plan 9 installation could help review this pull request for you. Otherwise the change does not make sense to me.

(Also I think you should fix your system clock...? The commits appear to be authored in 2023)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR focuses on Plan 9 port maintenance by addressing regressions introduced after the initial Plan 9 port landed, primarily around process exiting semantics and file descriptor duplication during marshaling.

Changes:

  • Moves JanetMarshalContext’s struct definition into the public header and removes the duplicate private definition in marsh.c.
  • Adjusts (os/exit ... force) behavior on Plan 9 to use exits(...) instead of _Exit(...).
  • Fixes Plan 9-specific dup usage when marshaling file handles.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/include/janet.h Exposes JanetMarshalContext layout in the public API.
src/core/os.c Adds Plan 9-specific forced-exit path for (os/exit ...).
src/core/marsh.c Removes the now-duplicated JanetMarshalContext struct definition.
src/core/io.c Uses Plan 9’s 2-argument dup(old, new) form when duplicating FDs for marshaling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/core/os.c
Comment on lines +290 to +294
#ifdef JANET_PLAN9
exits(nil);
#else
_Exit(status);
#endif
@bakpakin bakpakin merged commit ceb5697 into janet-lang:master Jun 9, 2026
18 checks passed
@iceghost

Copy link
Copy Markdown
Contributor

@bakpakin am I allowed to ask what was exactly the compile error here that led to my change being reverted?

@bakpakin

Copy link
Copy Markdown
Member

@iceghost I don't think this reverted anything?

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.

4 participants