C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 08-17-2008, 04:51 PM   #1
Registered User
 
Join Date: May 2007
Location: Berkeley, CA
Posts: 140
pipe question

On page 502 in the book "Advanced Programming in the Unix Environment" by Stevens and Rago,
they have a the following function to help sychronize the parent and
child.

Code:
static int pfd1[2] , pfd2[2];

void
TELL_PARENT(pid_t pid)
{
    if (write(pfd2[1],  "c", 1) != 1)
        err_sys("write error");

}
What's the point of using pid if the function TELL_PARENT() doesn't
actually use it?
Overworked_PhD is offline   Reply With Quote
Old 08-17-2008, 05:57 PM   #2
Registered User
 
Codeplug's Avatar
 
Join Date: Mar 2003
Posts: 3,903
I think it's an attempt by the authors to confuse their readers.....or just an omission.

Check the errata for other "oops": http://www.apuebook.com/index.html

gg
Codeplug is offline   Reply With Quote
Old 08-17-2008, 06:05 PM   #3
Registered User
 
Join Date: May 2007
Location: Berkeley, CA
Posts: 140
There's nothing about it in the errata.
Overworked_PhD is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced Piping Question! Paul22000 C Programming 14 04-17-2009 09:55 AM
Alice.... Lurker General Discussions 16 06-20-2005 02:51 PM
Pipe the console from a DLL loobian Windows Programming 12 11-30-2003 08:55 PM
Question... TechWins A Brief History of Cprogramming.com 16 07-28-2003 09:47 PM
Pipe not working fully Heraclitus Linux Programming 1 03-05-2003 10:09 AM


All times are GMT -6. The time now is 11:03 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22