linux-sysprog · beginner · ~15 min
Know the one correct type for a handler flag.
A flag shared with a handler must have the right type. Implement int flag_type_ok(const char *type) returning 1 only for "volatile sig_atomic_t".
#include <string.h>
int flag_type_ok(const char *type) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.