![]() |
|
|
|
|
|||||||
| 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 |
| read and write from a file | rinku | Shell Programming and Scripting | 2 | 01-10-2008 09:22 PM |
| Problem with read & write | EltonSky | High Level Programming | 11 | 08-31-2006 11:35 AM |
| sed to read and write to very same file | 435 Gavea | Shell Programming and Scripting | 5 | 06-29-2006 08:04 PM |
| How to implement read/write thread | shilpi_gup | High Level Programming | 1 | 10-23-2005 11:35 PM |
| popening for read and write | szzz | High Level Programming | 1 | 11-18-2003 08:05 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
hi guys, I'have a question 4 u.
Why this code give me the right output (an integer on the stdout): Code:
read(fd,&mpid,sizeof(pid_t));
printf("%d\n",mpid);
Code:
read(fd,&mpid,sizeof(pid_t)); write(STDOUT_FILENO,&mpid,sizeof(pid_t)); The "fd" file descriptor points to a fifo, but I think this isn't important cause I've got the same problem if i try reading from a normal file.
__________________
M3xican |
| Forum Sponsor | ||
|
|
| Thread Tools | |
| Display Modes | |
|
|