-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
Vikas Upadhyay writes: > Hi All, > I have two programs, one writes to fifo (writefifo.c) and another reads from > fifo (readfifo.c) - sources at bottom of the mail). > The fifo has been created as myfifo > vi...@myhost:~/prg> ls -l myfifo > prw-r--r-- 1 vikas users 0 Feb 26 04:09 myfifo > Host is a 64 bit SLES (Suse) 10. > When I run writefifo on one terminal & readfifo on another, readfifo shows > me messages like: > vi...@myhost:~/prg> ./readfifo > Inside main > fd of fifo=3: > read 300 bytes --->message number #0<--- > read 300 bytes ---><--- [...] > read 300 bytes --->message number #117<--- > read 300 bytes ---><--- > read 300 bytes --->message number #120<--- > read 300 bytes ---><--- > read 0 bytes ---><--- You've not mentioned the actual problem, you're facing. And from reading your C code, and using my human intelligence, I assumed you expect all message numbers to be printed, which in actual execution are skipped because your reader/writer programs use different sizes for read/write buffers. Try keeping them same and enjoy the bliss of synchronization :). HTH - -- They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety. -- Benjamin Franklin, Memoirs of the life and writings of Benjamin Franklin -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iEYEARECAAYFAkuIM0oACgkQHy+EEHYuXnTB0gCgzC5yRcrthIiLITJTQ9MbiA5W 6SMAoJR/B9NaO4yZUq/7mERTjvgHVOQe =Ewpw -----END PGP SIGNATURE----- _______________________________________________ Ilugd mailing list [email protected] http://frodo.hserus.net/mailman/listinfo/ilugd
