Skip to content

Instantly share code, notes, and snippets.

@yodalee
Created Jan 1, 2014
Embed
What would you like to do?
uint32_t working_thread = 0;
working_thread = htonl(check_working(global_server->pool)); //get working thread num
fd = open(global_server->arg.fifofile, O_WRONLY | O_NONBLOCK);
if (fd == -1) {
fprintf(stderr, "open fifo file fail\n");
return;
}
write(fd, &working_thread, sizeof(uint32_t));
close(fd);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment