Ejemplo n.º 1
0
__attribute__((constructor)) static void _liblogfaf_init(void) {
    DBG(("liblogfaf: init()\n"));
    init_progname(&shared_data);
    init_hostname(&shared_data);
    init_connection(&shared_data);
    pthread_mutex_init(&shared_data.lock, NULL);
    set_defaults(&shared_data);
}
Ejemplo n.º 2
0
__attribute__((constructor)) static void _liblogfaf_init(void) {
    DBG(("liblogfaf: init()\n"));
    init_progname(&shared_data);
    init_hostname(&shared_data);
    init_connection(&shared_data);
    if (pthread_mutex_init(&shared_data.lock, NULL) != 0) {
        fprintf(stderr, "liblogfaf: pthread_mutex_init() failed\n");
        exit(1);
    }
    set_defaults(&shared_data);
}