![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| UNIX domain sockets vs FIFOs | mgessner | UNIX for Advanced & Expert Users | 2 | 03-27-2008 09:03 PM |
| tar and fifos | Corona688 | UNIX for Advanced & Expert Users | 8 | 08-23-2006 07:21 PM |
| A little help understanding FIFOs? | deckard | Linux | 0 | 11-01-2005 01:46 PM |
| forks, ipc, fifos, update issues... | Funktar | High Level Programming | 6 | 10-02-2005 02:00 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
omg i need help so bad. I've been working on a school project for what seems like an eternity and i'm close to deadline. Using FIFO's (i ahve to) to communicate between parent and child proc's. Right now I'm stuck on a read/write.
fifomsg is a struct with int length and char[16] message fields. This is what I'm trying to send between the processes. child code: Code:
fdw = Open("syscallfifo", O_WRONLY);
fifomsg msg1;
strcpy(msg1.message, (char*)pid);
msg1.length = sizeof(msg1);
write(fdw, &msg1, sizeof(msg1));
close(fdw);
Code:
fdr = Open("syscallfifo", O_RDWR);
fifomsg msg1;
read(fdr, &msg1.length, sizeof(msg1.length));
read(fdr, &msg1.message, sizeof(msg1) - sizeof(msg1.length));
close(fdr);
At this point in execution, the process halts and I have to suspend/kill. I'm begging for help. As soon as possible would be ideal. Thank anyone for any consideration. edit: wanted to mention I manaully browsed through the last 5 or 6 months of posts trying to find a similar situation and couldn't. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|