Ejemplo n.º 1
0
/* Signal handler for odrawinfo
 */
void odrawinfo_signal_handler(
      libcsystem_signal_t signal LIBCSYSTEM_ATTRIBUTE_UNUSED )
{
	libcerror_error_t *error = NULL;
	static char *function   = "odrawinfo_signal_handler";

	LIBCSYSTEM_UNREFERENCED_PARAMETER( signal )

	odrawinfo_abort = 1;

	if( ( odrawinfo_info_handle != NULL )
	 && ( info_handle_signal_abort(
	       odrawinfo_info_handle,
	       &error ) != 1 ) )
	{
		libcnotify_printf(
		 "%s: unable to signal info 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 );
	}
}
Ejemplo n.º 2
0
/* Signal handler for esedbinfo
 */
void esedbinfo_signal_handler(
      libsystem_signal_t signal )
{
	liberror_error_t *error = NULL;
	static char *function   = "esedbinfo_signal_handler";

	esedbinfo_abort = 1;

	if( esedbinfo_info_handle != NULL )
	{
		if( info_handle_signal_abort(
		     esedbinfo_info_handle,
		     &error ) != 1 )
		{
			libsystem_notify_printf(
			 "%s: unable to signal info handle to abort.\n",
			 function );

			libsystem_notify_print_error_backtrace(
			 error );
			liberror_error_free(
			 &error );
		}
	}
	/* Force stdin to close otherwise any function reading it will remain blocked
	 */
	if( libsystem_file_io_close(
	     0 ) != 0 )
	{
		libsystem_notify_printf(
		 "%s: unable to close stdin.\n",
		 function );
	}
}
Ejemplo n.º 3
0
/* Signal handler for agdbinfo
 */
void agdbinfo_signal_handler(
      agdbtools_signal_t signal AGDBTOOLS_ATTRIBUTE_UNUSED )
{
	libcerror_error_t *error = NULL;
	static char *function   = "agdbinfo_signal_handler";

	AGDBTOOLS_UNREFERENCED_PARAMETER( signal )

	agdbinfo_abort = 1;

	if( agdbinfo_info_handle != NULL )
	{
		if( info_handle_signal_abort(
		     agdbinfo_info_handle,
		     &error ) != 1 )
		{
			libcnotify_printf(
			 "%s: unable to signal info 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 );
	}
}