Skip to content

Commit d2397f4

Browse files
committed
Implement os.abort
1 parent 6e796d7 commit d2397f4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vm/src/stdlib/os.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,14 @@ mod _os {
714714
std::process::exit(code)
715715
}
716716

717+
#[pyfunction]
718+
fn abort() {
719+
extern "C" {
720+
fn abort();
721+
}
722+
unsafe { abort() }
723+
}
724+
717725
#[pyfunction]
718726
fn urandom(size: usize, vm: &VirtualMachine) -> PyResult<Vec<u8>> {
719727
let mut buf = vec![0u8; size];

0 commit comments

Comments
 (0)