Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <unistd.h>
- #define SERVER "./fifo_server"
- #define CLIENT "./fifo_client"
- #define FIFO "/tmp/rotten_hack"
- /* a NON-ERROR-CHECKED driver for the FIFO server and client */
- main(int argc, char **argv)
- {
- mkfifo(FIFO, S_IRWXU);
- if(fork())
- {
- execl(SERVER, (char *) NULL);
- }
- if(fork())
- {
- execl(CLIENT, (char *) NULL);
- }
- unlink(FIFO); /* is there a synchronization issue here? */
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement