CS241

IPC

Pipes

What are they?

In Memory

They aren’t anything more than big queues.

What can you do with em?

Gotchas

Why do I need to close pipes?

If you don’t close your pipes properly (the unused ends), then your application can deadlock. When you do a read to a closed pipe you get an error code, when you do a write to a closed pipe you get a SIGPIPE. Both of these are vital to closing the application.

How does dup function?

Hint Hint

O_CLOEXEC

Be careful of forkbomb

What forkbomb?

This is the second time that we see people spiking in forkbombing their VMs. This is usually a convex combination of carelessness and putting fork() inside of a for loop.

Questions?

Author: Bhuvan Venkatesh