fix(process): 修复vfork实现并添加相关测试#1358
Merged
fslongjin merged 1 commit intoDragonOS-Community:masterfrom Nov 11, 2025
Merged
Conversation
Member
fslongjin
commented
Nov 11, 2025
- 修正vfork系统调用实现,使用正确的CLONE_VFORK | CLONE_VM标志
- 在execve中添加vfork完成通知机制
- 添加vfork相关测试用例到白名单
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the vfork system call implementation to use the correct CLONE_VFORK | CLONE_VM flags and adds a completion notification mechanism in execve to wake the parent process. The changes ensure proper vfork semantics where the parent is blocked until the child calls execve or exits.
- Corrected vfork implementation to use
CLONE_VFORK | CLONE_VMflags instead of empty flags - Added vfork completion notification in execve before switching address spaces
- Added vfork_test to the test whitelist with specific test cases blocklisted
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| user/apps/tests/syscall/gvisor/whitelist.txt | Adds vfork_test to the enabled test suite |
| user/apps/tests/syscall/gvisor/blocklists/vfork_test | Creates blocklist for two specific vfork test cases that are not yet passing |
| kernel/src/process/syscall/sys_vfork.rs | Updates vfork implementation to use correct CLONE_VFORK and CLONE_VM flags |
| kernel/src/process/execve.rs | Adds vfork completion notification mechanism after successful execve |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- 修正vfork系统调用实现,使用正确的CLONE_VFORK | CLONE_VM标志 - 在execve中添加vfork完成通知机制 - 添加vfork相关测试用例到白名单 Signed-off-by: longjin <longjin@DragonOS.org>
a1439e3 to
d06623e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.