mirror of
				https://github.com/ohwgiles/laminar.git
				synced 2025-06-13 12:54:29 +00:00 
			
		
		
		
	send SIGKILL to unterminated child jobs
If we haven't exited 2 seconds after SIGTERM, send SIGKILL. This allows aborting of runs with wayward descendent processes.
This commit is contained in:
		
							parent
							
								
									1bb545e3f9
								
							
						
					
					
						commit
						559a6480ee
					
				| @ -83,7 +83,10 @@ Leader::Leader(kj::AsyncIoContext &ioContext, kj::Filesystem &fs, const char *jo | ||||
|             scripts.pop(); | ||||
|         // TODO: probably shouldn't do this if we are already in a runOnAbort script
 | ||||
|         kill(-currentGroupId, SIGTERM); | ||||
|         // TODO: wait a few seconds for exit, then send KILL?
 | ||||
|         return this->ioContext.provider->getTimer().afterDelay(2*kj::SECONDS).then([this]{ | ||||
|             fprintf(stderr, "[laminar] sending SIGKILL to process group %d\n", currentGroupId); | ||||
|             kill(-currentGroupId, SIGKILL); | ||||
|         }); | ||||
|     })); | ||||
| 
 | ||||
|     pipe(setEnvPipe); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user