I got it to work. I reworked all of my original code, but I did clear up the points you gave me in the new program and it worked. I really just needed to give the pipe a name, instead of using a name which worked.
Main Topics
Browse All TopicsI am working with unnamed and named pipes. I have already figured out the unnamed pipe, but have worked up a named pipe program, but it does not work. Could someone please tell me if I am even close.
I need the code to be able to use a named pipe function to have the output of the "ps -ef" command sent through the pipe to the "grep cm415b"command.
so: nova> ps -ef | grep cm415b
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: KdoPosted on 2009-11-03 at 06:23:29ID: 25729178
Hi FIsh,
A couple of things to note. The execl() family of functions overlay the current process (task) with the process named in the call. Since the process becomes the new process, execl() can not return to execute code in the original process. If you see message "Running grep command" or "Running ps command" it means that the execl() function did NOT work. (You should probably move the messages above the calls to execl() and put error messages after the call.)
The next thing to check is the named pipe. Your call to execl() doesn't specify the location for input or output so the new processes will read from the default stream. You need to tell the tasks to use the named pipe.
Good Luck,
Kent