Deleted Added
full compact
pipe.c (1639) pipe.c (8875)
1.\" Copyright (c) 1986, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 26 unchanged lines hidden (view full) ---

35
36#define DATA "Bright star, would I were steadfast as thou art . . ."
37
38/*
39 * This program creates a pipe, then forks. The child communicates to the
40 * parent over the pipe. Notice that a pipe is a one-way communications
41 * device. I can write to the output socket (sockets[1], the second socket
42 * of the array returned by pipe()) and read from the input socket
1.\" Copyright (c) 1986, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 26 unchanged lines hidden (view full) ---

35
36#define DATA "Bright star, would I were steadfast as thou art . . ."
37
38/*
39 * This program creates a pipe, then forks. The child communicates to the
40 * parent over the pipe. Notice that a pipe is a one-way communications
41 * device. I can write to the output socket (sockets[1], the second socket
42 * of the array returned by pipe()) and read from the input socket
43 * (sockets[0]), but not vice versa.
43 * (sockets[0]), but not vice versa.
44 */
45
46main()
47{
48 int sockets[2], child;
49
50 /* Create a pipe */
51 if (pipe(sockets) < 0) {

--- 23 unchanged lines hidden ---
44 */
45
46main()
47{
48 int sockets[2], child;
49
50 /* Create a pipe */
51 if (pipe(sockets) < 0) {

--- 23 unchanged lines hidden ---