File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -412,6 +412,8 @@ async fn spawn_child(
412412 user_envs : & [ ( OsString , OsString ) ] ,
413413 lifecycle_handler : & mut dyn LifecycleHandler ,
414414) -> io:: Result < process:: Child > {
415+ lifecycle_handler. pre_new_process ( ) . await ;
416+
415417 let mut args = env:: args ( ) ;
416418 let process_name = args. next ( ) . unwrap ( ) ;
417419
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ pub trait LifecycleHandler: Send {
1919 Ok ( ( ) )
2020 }
2121
22+ /// Called before the child process has been spawned.
23+ async fn pre_new_process ( & mut self ) { }
24+
2225 /// Called after `send_to_new_process` if the child process fails to start successfully.
2326 /// This gives you an opportunity to undo any state changes made in `send_to_new_process`.
2427 async fn new_process_failed ( & mut self ) { }
You can’t perform that action at this time.
0 commit comments