This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,9 @@ export async function checkMagicBytes(
152152 chunks . push ( chunk ) ;
153153 }
154154 const actual = Buffer . concat ( chunks ) ;
155- log ( `Comparing file's magic bytes <${ actual . toString ( ) } > and desired <${ desired . toString ( ) } >` ) ;
155+ log (
156+ `Comparing file's magic bytes <${ actual . toString ( ) } > and desired <${ desired . toString ( ) } >` ,
157+ ) ;
156158 return Buffer . compare ( actual , desired ) === 0 ;
157159}
158160
@@ -499,3 +501,11 @@ export async function getResourcesInfo(): Promise<ResourcesInfo> {
499501export const updateNvidiaInfo = async ( ) =>
500502 await _updateNvidiaInfo ( nvidiaConfig ) ;
501503export const getCurrentNitroProcessInfo = ( ) => getNitroProcessInfo ( subprocess ) ;
504+
505+ /**
506+ * Trap for system signal so we can stop nitro process on exit
507+ */
508+ process . on ( "SIGTERM" , async ( ) => {
509+ log ( `[NITRO]::Debug: Received SIGTERM signal` ) ;
510+ await killSubprocess ( ) ;
511+ } ) ;
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ const downloadBinaries = (
150150 ) ;
151151} ;
152152
153- // Check for a files with nitro in name in the corresponding directory
153+ // Check for files with nitro in name in the corresponding directory
154154const verifyDownloadedBinaries = ( absBinDirPath : string ) => {
155155 // Check all the paths in variantConfig for a file with nitro in its name
156156 return Object . values ( variantConfig ) . every ( ( binDirVariant : string ) => {
You can’t perform that action at this time.
0 commit comments