04-15-2013 05:52 AM
Facing the problem when pipe (IPC) I'm creating using open(...) method is created in the wrong way. Pipe character ('|') is being appended to the name I give.
When I run my program I get this file created:
prw-r----- 1 aleks cortex 0 Apr 15 14:15 832081|
while the name I use is /home/aleks/tmp/832081. I have checked the string I'm usign as a pipe name.
Here is a code snippet:
short open_for_resp( void )
/* NOTE: open on a pipe with RDONLY waits until there */
/* is a writer on the other end - how convenient ! */
fprintf(stderr, "YOPT [%s]", M_fifonm);
fd = open(M_fifonm, O_RDONLY);
Output I get:
Any help would be appreciated.
Solved! Go to Solution.
04-15-2013 09:47 AM - edited 04-15-2013 08:23 PM
>ls gives me this output to identify the pipe.
That's correct. Using "ls -F" will add a variety of chars to identify pipes, executables, directories and symlinks.
(Also your snippet didn't show the mknod(2) call.)