Ignore:
Timestamp:
Jul 16, 2009, 1:42:47 AM (11 years ago)
Author:
Pascal Terjan
Message:
  • Exit cleanly from the server instead of segfaulting
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/server.c

    r3541 r3555  
    188188}
    189189
    190 static int server_main(struct screen_list *screen_list)
     190static void server_main(struct screen_list *screen_list)
    191191{
    192192    int i;
     
    194194    long long unsigned int last_key_time = 0;
    195195    long long unsigned int last_refresh_time = 0;
    196     int mainret = 0;
    197196
    198197    screen_list->attached = 0;
     
    489488    }
    490489
    491     return mainret;
     490    exit(0);
    492491}
    493492
     
    531530#endif
    532531        setsid();
    533         return server_main(screen_list);
     532        server_main(screen_list);
     533        /* Never returns */
    534534    }
    535535    create_socket(screen_list, SOCK_CLIENT);
Note: See TracChangeset for help on using the changeset viewer.