Explore BrainMass
Share

Explore BrainMass

    Inter-process communication: Pipe between parent and child

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Write a program "oneway" which implements a one-way communication between a parent process and it's child using a pipe.

    The parent takes a message (from the command line), sends it to the child (through the pipe), and the child displays the message.

    The program has just one argument on the command line (the message).

    An example of the execution could be:

    Prompt -> oneway hellothere
    I am the parent. I sent the message: hellothere.
    I am the child. I received the message: hellothere.

    © BrainMass Inc. brainmass.com October 9, 2019, 11:31 pm ad1c9bdddf
    https://brainmass.com/computer-science/program-execution/inter-process-communication-pipe-between-parent-child-259135

    Solution Summary

    Attached program makes use of unnamed pipe, the one that is created using the "pipe" system call.

    $2.19