File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -986,6 +986,12 @@ impl BaseContainer for LinuxContainer {
986
986
987
987
async fn start ( & mut self , mut p : Process ) -> Result < ( ) > {
988
988
let logger = self . logger . new ( o ! ( "eid" => p. exec_id. clone( ) ) ) ;
989
+
990
+ // Check if exec_id is already in use to prevent collisions
991
+ if self . processes . contains_key ( p. exec_id . as_str ( ) ) {
992
+ return Err ( anyhow ! ( "exec_id '{}' already exists" , p. exec_id) ) ;
993
+ }
994
+
989
995
let tty = p. tty ;
990
996
let fifo_file = format ! ( "{}/{}" , & self . root, EXEC_FIFO_FILENAME ) ;
991
997
info ! ( logger, "enter container.start!" ) ;
Original file line number Diff line number Diff line change @@ -584,8 +584,7 @@ impl AgentService {
584
584
let p = sandbox. find_container_process ( cid. as_str ( ) , eid. as_str ( ) ) ?;
585
585
586
586
p. exit_watchers . push ( exit_send) ;
587
- // pid = p.pid;
588
-
587
+
589
588
p. exit_rx . clone ( )
590
589
} ;
591
590
You can’t perform that action at this time.
0 commit comments