Linux で C 言語でパイプラインを学習しようとしています。以下のプログラムを書きます。このプログラムにエラーはありませんか?
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
int main (void)
{
    int fd[2], nbytes;
    pid_t childpid;
    char string[]= "Hello, World!\n";
    char readbuffer[80];
    pipe(fd);
    if((childpid = fork()) == -1)
    {
        perror("fork");
        exit(0);    
    } 
    if(childpid == 0)
    {
        // child process closes up input side of pipe.
        close(fd[0]);
        // send "string" through the output side of pipe.
        write(fd[1], string, strlen(string));
        exit(0);
    }
    else
    {
        // parent process closes up output side of pipe.
        close(fd[0]);
        // Read in a string from pipe.
        nbytes = read(fd[0], readbuffer, sizeof(readbuffer));
        printf("Received string = %s\n", readbuffer);
    }
    return 0;
}
何か問題ある?