00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <stdio.h>
00022 #include <limits.h>
00023 #include <signal.h>
00024 #include <time.h>
00025 #include <unistd.h>
00026 #include <errno.h>
00027
00028 #include <utils/utils.h>
00029 #include <sed/sed_sedflux.h>
00030 #include "sedflux.h"
00031
00032 int
00033 main( int argc , char *argv[] )
00034 {
00035 gboolean success = TRUE;
00036 Sedflux_param_st* p = NULL;
00037 GError* error = NULL;
00038 gchar* command_str = NULL;
00039
00040 g_thread_init( NULL );
00041 eh_init_glib();
00042 g_log_set_handler( NULL , G_LOG_LEVEL_MASK , &eh_logger , NULL );
00043
00044 command_str = eh_render_command_str( argc , argv );
00045
00046
00047 p = sedflux_parse_command_line( argc , argv , &error );
00048 eh_exit_on_error( error , "Error parsing command line arguments" );
00049
00050
00051 sedflux_setup_project_dir( &p->init_file , &p->working_dir , &error );
00052 eh_exit_on_error( error , "Error setting up project directory" );
00053
00054 sedflux_print_info_file( p->init_file , p->working_dir , command_str , p->run_desc );
00055
00056
00057 sed_signal_set_action();
00058
00059
00060 success = sedflux( p->init_file );
00061
00062 eh_free( p );
00063
00064 if ( g_getenv("SED_MEM_CHECK") ) eh_heap_dump( "heap_dump.txt" );
00065
00066 if ( success ) eh_exit( EXIT_SUCCESS );
00067 else eh_exit( EXIT_FAILURE );
00068
00069 return EXIT_SUCCESS;
00070 }
00071
00072