Skip to content

Instantly share code, notes, and snippets.

@yodalee
Created January 1, 2014 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yodalee/8209381 to your computer and use it in GitHub Desktop.
Save yodalee/8209381 to your computer and use it in GitHub Desktop.
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