Multiple time communication between parent and child (fork()) using two pipe()s?

view full story

http://stackoverflow.com – I haven't found an answer exactly to my problem; the idea is: I have to simulate a client-server communication using parent-child processes. The parent must have a menu like 1. login , 2. quit; when using 1, it prompts for a username. Then, the username is sent to the child, this one verifies if the username exists in "the database" (actually in /etc/passwd; more to come on this, another problem), and then returns an answer to the parent. If the login is valid, the parent proceeds to other options (1.option 1; 2.option 2; 3. logout; 4. quit). But I'm stuck at the login part for now and probabl (HowTos)