Skip to content

Unref the SysCallCondition before waking the thread#3652

Merged
stevenengler merged 5 commits intoshadow:mainfrom
stevenengler:fix-file-close
Sep 9, 2025
Merged

Unref the SysCallCondition before waking the thread#3652
stevenengler merged 5 commits intoshadow:mainfrom
stevenengler:fix-file-close

Conversation

@stevenengler
Copy link
Copy Markdown
Contributor

This fixes the example in #3650 and fixes #3564. It unrefs the SysCallCondition before we call host_continue in the wakeup task. This allows us to unref its OpenFile, otherwise the file cannot be closed until host_continue() finishes.

Let me know if there's a nicer way to do this, but I don't see one.

The explanation of what's happening is in #3650 (comment). Lmk if that comment isn't very clear.

@github-actions github-actions bot added Component: Testing Unit and integration tests and frameworks Component: Main Composing the core Shadow executable labels Sep 7, 2025
@stevenengler stevenengler force-pushed the fix-file-close branch 3 times, most recently from 7579000 to 4d846ba Compare September 7, 2025 20:05
@github-actions github-actions bot added Component: Build Build/install tools and dependencies Component: Documentation In-repository documentation, under docs/ labels Sep 7, 2025
@stevenengler stevenengler requested a review from a team September 7, 2025 20:21
Copy link
Copy Markdown
Contributor

@sporksmith sporksmith left a comment

Choose a reason for hiding this comment

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

Nice!

@stevenengler stevenengler merged commit a3b65fc into shadow:main Sep 9, 2025
24 checks passed
@stevenengler stevenengler deleted the fix-file-close branch September 9, 2025 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Build Build/install tools and dependencies Component: Documentation In-repository documentation, under docs/ Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Netcat's -k option doesn't work on vanilla openbsd netcat

2 participants