![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Build a Google Talk Client Using Oracle ADF Faces Rich Client and the Active Data Ser | iBot | Oracle Updates (RSS) | 0 | 04-18-2008 03:10 PM |
| how to use fifo | atticus | High Level Programming | 3 | 06-05-2006 07:15 AM |
| Does it require each x-client sould run in separate process? | ps_sureshreddi | UNIX Desktop for Dummies Questions & Answers | 0 | 02-13-2005 11:29 PM |
| process executable file full path | xtrix | UNIX for Advanced & Expert Users | 3 | 10-11-2004 01:28 AM |
| i want to pass the connect fd to child process,how can i do ti? | hit | High Level Programming | 6 | 07-17-2002 11:45 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
||||||
|
How to pass FIFO path to client process ?
Hello everybody !
I have a first program, called "server" which build 2 FIFO's in this way: Code:
... #define PERMS 0666 #define FIFO1 "\tmp\cerere" #define FIFO2 "\tmp\raspuns" ... mkfifo(FIFO1, PERMS) mkfifo(FIFO2, PERMS) ... I tried to pass the FIFO's path in the client command line, like that: Quote:
This is how I transform the command line arguments in "client": Code:
... const char* FIFO1 = malloc(sizeof (argv[1])); strncpy(FIFO1, argv[1], strlen(argv[1])); const char* FIFO2 = malloc(sizeof (argv[2])); strncpy(FIFO2, argv[2], strlen(argv[2])); ... Quote:
Quote:
Quote:
Quote:
Quote:
If I defined directly the FIFO's path in the source code of "client", like that: Code:
#define FIFO1 "\tmp\cerere" #define FIFO2 "\tmp\raspuns" What is wrong ? May somebody help me ? Thank you ! |
| Forum Sponsor | ||
|
|
|
|||
|
One error:
Code:
// this should be const char* FIFO1 = malloc(strlen (argv[1])); strncpy(FIFO1, argv[1], strlen(argv[1])); const char* FIFO2 = malloc(strlen (argv[2])); strncpy(FIFO2, argv[2], strlen(argv[2])); |
|||
| Google The UNIX and Linux Forums |