| | |
| | | const char *progname=NULL; |
| | | |
| | | char pid_file[64] = { 0 }; /* The file used to record the PID */ |
| | | char *conf_file = "iotd.conf"; |
| | | char *conf_file = "etc/iotd.conf"; |
| | | char *log_file = DEF_LOG_FILE; |
| | | int log_level = DEF_LOG_LEVEL; |
| | | iotd_ctx_t iotd_ctx; |
| | | |
| | | pthread_t tid; |
| | | // pthread_t tid; |
| | | iotd_conf_t *conf; |
| | | logger_t *logger; |
| | | |
| | |
| | | printf("Logger reopen failure with file: %s\n", logger->file); |
| | | return -1; |
| | | } |
| | | printf("Open logger ok\n"); |
| | | } |
| | | |
| | | if( !debug ) |
| | |
| | | cp_install_proc_signal(); |
| | | |
| | | /* start watchdog thread worker */ |
| | | thread_start(&tid, watchdog_worker, NULL); |
| | | //thread_start(&tid, watchdog_worker, NULL); |
| | | |
| | | /* Start MQTT thread worker */ |
| | | if( conf->mqtt_conf.enable ) |
| | |
| | | } |
| | | |
| | | close(wtd_fd); |
| | | printf("watchdog thread worker exit\n"); |
| | | log_warn("watchdog thread worker exit\n"); |
| | | |
| | | return NULL; |
| | | } |