0

In PHP, there's a call: posix_mkfifo() which basically makes a fifo. Is there a way to set a limit on this file/fifo? Otherwise, if no one is pulling data out, it can grow unbounded.

Thanks in advance for any help.

user645402
  • 737
  • 1
  • 16
  • 34

1 Answers1

1

The named pipes created by mkfifo do not have a buffer on the filesystem.

That means: The fifo will always be zero bytes in length and doesn't consume any storage space (except metadata). Hence, it cannot grow unbounded and there's no need to limit it.

When a process attempts to write bytes to the fifo, it will be blocked until another process reads these bytes.