Changeset 3836

Show
Ignore:
Timestamp:
03/01/06 19:39:07 (2 years ago)
Author:
morris
Message:

Sync

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trackerd/trunk/trackerd/main.c

    r3835 r3836  
    7575int main(int argc, const char **argv) { 
    7676        wi_pool_t                       *pool; 
    77         wi_array_t                      *array; 
    78         wi_string_t                     *options, *string; 
     77        wi_string_t                     *string; 
    7978        int                                     ch, facility; 
    8079        wi_boolean_t            no_chroot, test_config; 
     
    8281        /* init libwired */ 
    8382        wi_initialize(); 
     83        wi_load(argc, argv); 
     84         
    8485        pool                                    = wi_pool_init(wi_pool_alloc()); 
    8586        wi_log_startup                  = true; 
    8687        wi_log_syslog                   = true; 
    8788        wi_log_syslog_facility  = LOG_DAEMON; 
    88         wi_log_name                             = wi_string_init_with_cstring(wi_string_alloc(), "trackerd"); 
    8989 
    9090        /* init core systems */ 
     
    206206        /* dump command line */ 
    207207        if(wi_log_level >= WI_LOG_DEBUG) { 
    208                 array = wi_array_init_with_argv(wi_array_alloc(), argc, argv); 
    209                 options = wi_array_components_joined_by_string(array, WI_STR(" ")); 
    210                 wi_log_debug(WI_STR("Started as %@"), options); 
    211                 wi_release(array); 
     208                wi_log_debug(WI_STR("Started as %@ %@"), 
     209                        wi_process_path(wi_process()), 
     210                        wi_array_components_joined_by_string(wi_process_arguments(wi_process()), WI_STR(" "))); 
    212211        } 
    213212 
     
    330329        update = interval; 
    331330 
    332 #ifdef HAVE_SETPROCTITLE 
    333         setproctitle("%u %s", wt_current_servers, wt_current_servers == 1 ? "server" : "servers"); 
    334 #endif 
     331        wi_process_set_name(wi_process(), wi_string_with_format(WI_STR("%u %@"), 
     332                wt_current_servers, 
     333                wt_current_servers == 1 
     334                        ? WI_STR("server") 
     335                        : WI_STR("servers"))); 
    335336 
    336337        if(wt_settings.status) {