Skip to content

Instantly share code, notes, and snippets.

@kotaroito
Created February 3, 2014 01:13
Show Gist options
  • Save kotaroito/8777552 to your computer and use it in GitHub Desktop.
Save kotaroito/8777552 to your computer and use it in GitHub Desktop.
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
int main(void)
{
int fds[2];
if ( pipe(fds) < 0 ) {
perror("pipe");
exit(EXIT_FAILURE);
}
printf("fds[0]: %d\n", fds[0]);
printf("fds[1]: %d\n", fds[1]);
sleep(100);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment