]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
ras-events: warn if something got wrong with threads
authorMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 3 May 2013 17:16:15 +0000 (14:16 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 3 May 2013 17:52:30 +0000 (14:52 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ras-events.c

index f173424d46d4bb888179f42e6c873c8e642e9f30..a8285ef34404660f1686cda21a899fc698b12923 100644 (file)
@@ -395,6 +395,9 @@ int handle_ras_events(int record_events)
                                    handle_ras_events_cpu,
                                    (void *)&data[i]);
                if (rc) {
+                       log(SYSLOG, LOG_INFO,
+                           "Failed to create thread for cpu %d. Aborting.\n",
+                           i);
                        while (--i)
                                pthread_cancel(data[i].thread);
                        goto free_threads;
@@ -405,6 +408,8 @@ int handle_ras_events(int record_events)
        for (i = 0; i < cpus; i++)
                pthread_join(data[i].thread, NULL);
 
+       log(SYSLOG, LOG_INFO, "Huh! something got wrong. Aborting.\n");
+
 free_threads:
        free(data);