forge
Explore
Log in

Don't you dare go Hollow

Remove NOTIFY_FD after reading it

Browse files at this commit

1a784e6e66785f360da6df59ae2fb4b98370ca3cIvan MolodetskikhParent: 3ee2db7
src/main.rsmodified+1 -0
@@ -323,6 +323,7 @@ fn notify_fd() -> anyhow::Result<()> {
323 Err(env::VarError::NotPresent) => return Ok(()),323 Err(env::VarError::NotPresent) => return Ok(()),
324 Err(err) => return Err(err.into()),324 Err(err) => return Err(err.into()),
325 };325 };
326+ env::remove_var("NOTIFY_FD");
326 let mut notif = unsafe { File::from_raw_fd(fd) };327 let mut notif = unsafe { File::from_raw_fd(fd) };
327 notif.write_all(b"READY=1\n")?;328 notif.write_all(b"READY=1\n")?;
328 Ok(())329 Ok(())