# pipe() Destination Driver

### Important Information

Pipe is very similar to the file() driver, but there are a few differences, for example, pipe() opens its argument in read-write mode, therefore it is not recommended to use pipe() on anything else than real pipes. Pipes are created automatically so you don't need to create the pipe using the mkfifo(1) command.

### Status

| Architecture | Status |
| :----------: | :----: |
|      x86     |  Works |
|      ARM     |  Works |

### How to Test

To test the pipe() destination driver, we create a pipe called "myPipe" and write data into it. And then we read data from this pipe.

#### Configuration File Used

```
@version: 3.31
@include "scl.conf"

source custom
{
    example-msg-generator(
        num(5)
        template("Test Messages")
    );
};

destination d_pipe { 
    pipe("/Users/yash/Documents/myPipe" perm(0755)); 
};

log {
    source(custom);
    destination(d_pipe);
};
```

#### Proof

![pipe() destination driver tested on macOS (x86)](https://3267548193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MaZdBoDvCx_0JwOUICk%2F-McATkRbzFGDgLzqzh-R%2F-McAVnI23NY9TjydW9cD%2FScreenshot%202021-06-14%20at%208.11.19%20PM.png?alt=media\&token=1ad6dbf7-79af-4f30-bc27-fc76b2465e8b)

![pipe() destination driver tested on macOS (ARM)](https://3267548193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MaZdBoDvCx_0JwOUICk%2F-MhXfp6utMsNE9_-xfVe%2F-MhXl7x3gRGNvV3zAtmJ%2FScreen%20Shot%202021-08-20%20at%2011.49.12%20AM.png?alt=media\&token=ee82c49c-f14e-4c07-b81e-e5077fec32e3)
