RaspberrPi project source code
Guo Wenxue
2023-09-08 29b331b4375c1e07fee0e943ec90c3a855b6d428
project/socketd/sock_client.c
File was renamed from project/socketd/client.c
@@ -46,9 +46,9 @@
    int                daemon = 1;
    int                opt;
    char              *progname=NULL;
   char              *logfile="client.log";
   int                loglevel=LOG_LEVEL_INFO;
   int                logsize=10; /* logfile size max to 10K */
    char              *logfile="client.log";
    int                loglevel=LOG_LEVEL_INFO;
    int                logsize=10; /* logfile size max to 10K */
    struct option long_options[] = {
        {"debug", no_argument, NULL, 'd'},
@@ -66,8 +66,8 @@
        {
            case 'd': /* Set debug running */
                daemon = 0;
            logfile="console";
            loglevel=LOG_LEVEL_DEBUG;
                logfile="console";
                loglevel=LOG_LEVEL_DEBUG;
                break;
            case 'v':  /* Get software version */
@@ -84,11 +84,11 @@
    }
   if( log_open(logfile, loglevel, logsize, THREAD_LOCK_NONE) < 0 )
   {
      fprintf(stderr, "Initial log system failed\n");
      return 1;
   }
    if( log_open(logfile, loglevel, logsize, THREAD_LOCK_NONE) < 0 )
    {
        fprintf(stderr, "Initial log system failed\n");
        return 1;
    }
    install_default_signal();
@@ -102,6 +102,7 @@
cleanup:
    log_close();
    unlink(DAEMON_PIDFILE);
    return 0;
}