fcntl(sg_fd, F_SETFL, oflags | FASYNC)