Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>

int main()
{
    int fd[2], err;
    pipe(fd);
    err = fcntl(fd[0], F_SETOWN, getpid());
    if (err == -1)
        printf("fcntl failed: %d\n", errno);

    return 0;
}

/* Output:
fcntl failed: 25
*/