It assumes that /proc/self/cpuset exists here,
|
int fd = signal_safe_open("/proc/self/cpuset", O_RDONLY); |
but actually this file doesn't exist if kernel has been built with CONFIG_PROC_PID_CPUSET=n.
when /proc/self/cpuset doesn't exist, open() must be failed and variable fd become negative, then it will crash here.
|
CHECK_CONDITION(fd >= 0); |