Update nix to 0.30 (#6120) · RustPython/RustPython@0c8ae3a · GitHub
Skip to content

Commit 0c8ae3a

Browse files
authored
Update nix to 0.30 (#6120)
1 parent 056795e commit 0c8ae3a

10 files changed

Lines changed: 247 additions & 211 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion

Lib/test/test_posix.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,7 +1993,9 @@ def test_open_file(self):
19931993
with open(outfile, encoding="utf-8") as f:
19941994
self.assertEqual(f.read(), 'hello')
19951995

1996-
# TODO: RUSTPYTHON: FileNotFoundError: [Errno 2] No such file or directory (os error 2): '@test_55144_tmp' -> 'None'
1996+
# TODO: RUSTPYTHON: the rust runtime reopens closed stdio fds at startup,
1997+
# so this test fails, even though POSIX_SPAWN_CLOSE does
1998+
# actually have an effect
19971999
@unittest.expectedFailure
19982000
def test_close_file(self):
19992001
closefile = os_helper.TESTFN

common/src/crt_fd.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ impl Owned {
189189
pub fn into_raw(self) -> Raw {
190190
self.inner.into_raw_fd()
191191
}
192+
193+
pub fn leak<'fd>(self) -> Borrowed<'fd> {
194+
unsafe { Borrowed::borrow_raw(self.into_raw()) }
195+
}
192196
}
193197

194198
#[cfg(unix)]

stdlib/src/mmap.rs

Lines changed: 17 additions & 19 deletions

0 commit comments

Comments
 (0)