Without having a copy of that book, it's going to be difficult for us to explain to you the method given in the book.
There are several general techniques to pass a file descriptor from a parent process to a child process. If you know the file descriptor number before launching the child:
- put it in a command line parameter
- put it in an environment variable
- put it in a file on disk (not a great option)
If you only know the file descriptor after launching the child, then some sort of IPC will be needed:
- put it in shared memory
- send it to the child on a socket
It sounds like the book you're reading describes the last option. When sending a message to a child, you are free to choose the representation of whatever data you are sending. If you're sending a file descriptor (an integer) and no other information, then you're free to choose pretty much any representation. An ASCII representation of the integer might be suitable, or you could send four bytes representing a 32-bit integer.
Again, it's hard to guess why the book author is doing things the way they are, without knowing what the method actually is.