Skip to content

Commit cab53ec

Browse files
author
Jan Diederich
committed
Rebase on the latest original main
1 parent 937998a commit cab53ec

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/docker/local.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ pub(crate) fn run(
166166
// simpler: just test if the program termination handler was called.
167167
// SAFETY: an atomic load.
168168
#[allow(static_mut_refs)]
169-
let is_terminated = unsafe { crate::errors::TERMINATED.load(Ordering::SeqCst) };
169+
let is_terminated = crate::errors::TERMINATED.load(Ordering::SeqCst);
170170
if !is_terminated {
171171
ChildContainer::exit_static();
172172
}

src/docker/shared.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ use super::custom::{Dockerfile, PreBuild};
44
use super::image::PossibleImage;
55
use super::Image;
66
use super::PROVIDED_IMAGES;
7-
use super::custom::{Dockerfile, PreBuild};
8-
use super::image::PossibleImage;
97
use super::{ProvidedImage, engine::*};
108
use crate::cargo::CargoMetadata;
119
use crate::config::Config;

src/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub fn install_panic_hook() -> Result<()> {
1919

2020
/// # Safety
2121
/// Safe as long as we have single-threaded execution.
22-
unsafe fn termination_handler() {
22+
fn termination_handler() {
2323
// we can't warn the user here, since locks aren't signal-safe.
2424
// we can delete files, since fdopendir is thread-safe, and
2525
// `openat`, `unlinkat`, and `lstat` are signal-safe.
@@ -106,7 +106,7 @@ unsafe fn termination_handler() {
106106
// a global CString and `Vec<CString>`, respectively. this atomic guard
107107
// makes this safe regardless.
108108
#[allow(static_mut_refs)] // FIXME: Use correct types for CHILD_CONTAINER
109-
docker::CHILD_CONTAINER.terminate();
109+
unsafe { docker::CHILD_CONTAINER.terminate(); }
110110

111111
// all termination exit codes are 128 + signal code. the exit code is
112112
// 130 for Ctrl+C or SIGINT (signal code 2) for linux, macos, and windows.

0 commit comments

Comments
 (0)