pipe question

This is a discussion on pipe question within the Linux Programming forums, part of the Platform Specific Boards category; On page 502 in the book "Advanced Programming in the Unix Environment" by Stevens and Rago, they have a the ...

  1. #1
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329

    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?

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,691
    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

  3. #3
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    There's nothing about it in the errata.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Advanced Piping Question!
    By Paul22000 in forum C Programming
    Replies: 14
    Last Post: 04-17-2009, 10:55 AM
  2. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 03:51 PM
  3. Pipe the console from a DLL
    By loobian in forum Windows Programming
    Replies: 12
    Last Post: 11-30-2003, 08:55 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. Pipe not working fully
    By Heraclitus in forum Linux Programming
    Replies: 1
    Last Post: 03-05-2003, 10:09 AM

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