/* Signal handler for regfmount */ void regfmount_signal_handler( regftools_signal_t signal REGFTOOLS_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "regfmount_signal_handler"; REGFTOOLS_UNREFERENCED_PARAMETER( signal ) regfmount_abort = 1; if( regfmount_mount_handle != NULL ) { if( mount_handle_signal_abort( regfmount_mount_handle, &error ) != 1 ) { libcnotify_printf( "%s: unable to signal mount handle to abort.\n", function ); libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } } /* Force stdin to close otherwise any function reading it will remain blocked */ #if defined( WINAPI ) && !defined( __CYGWIN__ ) if( _close( 0 ) != 0 ) #else if( close( 0 ) != 0 ) #endif { libcnotify_printf( "%s: unable to close stdin.\n", function ); } }
/* Signal handler for vshadowmount */ void vshadowmount_signal_handler( libcsystem_signal_t signal LIBCSYSTEM_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "vshadowmount_signal_handler"; LIBCSYSTEM_UNREFERENCED_PARAMETER( signal ) vshadowmount_abort = 1; if( vshadowmount_mount_handle != NULL ) { if( mount_handle_signal_abort( vshadowmount_mount_handle, &error ) != 1 ) { libcnotify_printf( "%s: unable to signal mount handle to abort.\n", function ); libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } } /* Force stdin to close otherwise any function reading it will remain blocked */ if( libcsystem_file_io_close( 0 ) != 0 ) { libcnotify_printf( "%s: unable to close stdin.\n", function ); } }