Also, if I try to check what alarms are set in my program using alarmd commands I get a segfault. -- My program crashes every time at the "list=..."
#include <stdlib.h> #include <stdio.h> #include <time.h> #include <alarmd/alarm_event.h> int main(int argc, char **argv) { cookie_t *list, *iter; time_t now; now = time(NULL); list = alarm_event_query(now, now + 60, 0, 0); if (list == NULL) { fprintf(stderr, "alarm_event_query() failed\n"); return EXIT_FAILURE; } if (list[0] == (cookie_t) 0) { printf("no alarms set\n"); } else { printf("alarm ids:"); for (iter = list; *iter != (cookie_t) 0; iter++) { printf(" %u\n", (unsigned int) *iter); } printf("\n"); } free(list); return EXIT_SUCCESS; }