chiark / gitweb /
FOUND
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 17 Feb 2025 10:35:17 +0000 (10:35 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 17 Feb 2025 10:35:17 +0000 (10:35 +0000)
Cargo.lock
Cargo.toml
src/main.rs

index b3d28fd58ef172291eb3af38b44861704dd73a61..ee1dc9c724e8d54d528a04a669d83abb3414359f 100644 (file)
@@ -71,6 +71,12 @@ version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
+[[package]]
+name = "cfg_aliases"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
+
 [[package]]
 name = "educe"
 version = "0.5.11"
@@ -109,6 +115,8 @@ version = "0.1.0"
 dependencies = [
  "assert-unmoved",
  "educe",
+ "libc",
+ "nix",
  "pinarcmutex",
  "strum",
  "tokio",
@@ -174,6 +182,18 @@ dependencies = [
  "windows-sys 0.48.0",
 ]
 
+[[package]]
+name = "nix"
+version = "0.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4"
+dependencies = [
+ "bitflags",
+ "cfg-if",
+ "cfg_aliases",
+ "libc",
+]
+
 [[package]]
 name = "num_cpus"
 version = "1.16.0"
index ae62056bbb2a57e71b9aa9ede2cc7210a82f11f2..a53ca86a22d78de91ac61b34f59d2b8be78b102f 100644 (file)
@@ -8,6 +8,8 @@ edition = "2021"
 [dependencies]
 assert-unmoved = "0.1.6"
 educe = "0.5"
+libc = "0.2.154"
+nix = { version = "0.28.0", features = ["process"] }
 pinarcmutex = "0.1.1"
 strum = { version = "0.26.2", features = ["derive"] }
 tokio = { version = "1.37.0", features = ["full"] }
index e643acdef8d0cb7bc41cf237837daa02dc97af9a..2d9fae20092d068e73f6b389eb59ba4d49392b26 100644 (file)
@@ -1,19 +1,4 @@
-use std::pin::*;
-use std::mem;
 
-use pinarcmutex::*;
-use assert_unmoved::AssertUnmoved;
-
-type Payload = AssertUnmoved::<()>;
-
-#[tokio::main]
-async fn main() {
-    let pam = PinArcMutex::new(Payload::new(()));
-    let mut guard = pam.lock().await;
-    let payload: Pin<&mut Payload> = guard.get();
-    let _: Pin<&mut ()> = payload.get_pin_mut();
-    let payload: &mut Payload = &mut *guard;
-    let other_payload = Payload::new(());
-    mem::swap(payload, &mut other_payload);
-    other_payload.get_mut();
+fn main(){
+    nix::unistd::execv(c"t", &[c"t"]).unwrap();
 }