Remove old gVsior workaround

This commit is contained in:
Ruihan Li 2026-01-22 10:22:05 +08:00 committed by Jianfeng Jiang
parent 22dd288b07
commit b1071b6b92
2 changed files with 0 additions and 11 deletions

View File

@ -379,13 +379,6 @@ impl Process {
let mut session_table_mut = process_table::session_table_mut(); let mut session_table_mut = process_table::session_table_mut();
let mut group_table_mut = process_table::group_table_mut(); let mut group_table_mut = process_table::group_table_mut();
if session_table_mut.contains_key(&self.pid) {
// FIXME: According to the Linux implementation, this check should be removed, so we'll
// return `EPERM` due to hitting the following check. However, we need to work around a
// gVisor bug. The upstream gVisor has fixed the issue in:
// <https://github.com/google/gvisor/commit/582f7bf6c0ccccaeb1215a232709df38d5d409f7>.
return Ok(self.pid);
}
if group_table_mut.contains_key(&self.pid) { if group_table_mut.contains_key(&self.pid) {
return_errno_with_message!( return_errno_with_message!(
Errno::EPERM, Errno::EPERM,

View File

@ -138,11 +138,7 @@ END_TEST()
FN_TEST(setsid_session_leader) FN_TEST(setsid_session_leader)
{ {
// FIXME: We fail this test to work around a gVisor bug.
// See comments in `Process::to_new_session` for details.
#ifndef __asterinas__
TEST_ERRNO(setsid(), EPERM); TEST_ERRNO(setsid(), EPERM);
#endif
} }
END_TEST() END_TEST()