| | |
| | | char pid_file[64] = { 0 }; /* The file used to record the PID */ |
| | | const char *progname=NULL; |
| | | |
| | | char *host = "192.168.2.110:10086"; |
| | | char *host = "127.0.0.1:10086"; |
| | | //char *host = "baidu.com:10086"; |
| | | int log_level = LOG_LEVEL_NRML; |
| | | char *log_file = DEF_LOG_FILE; |
| | |
| | | return -1; |
| | | } |
| | | |
| | | daemon(1, 1); |
| | | set_daemon_running(pid_file); |
| | | } |
| | | |
| | | record_daemon_pid(pid_file); |
| | |
| | | |
| | | if( (rv=socket_recv(sock, buf, sizeof(buf), timeout)) < 0 ) |
| | | { |
| | | log_err("read ACK from server failure, rv=%d\n"); |
| | | log_err("read ACK from server failure, rv=%d\n", rv); |
| | | return -2; |
| | | } |
| | | } |