

Beej's Guide to Unix Interprocess Communication - RiderOfGiraffes
http://www.ecst.csuchico.edu/~beej/guide/ipc/

======
makecheck
This is pretty good. But it's important to understand just how much has
changed over time, and to add appropriate grains of salt.

For instance, the signals reference is showing its age. On Mac OS X (and
probably other systems), the current signal mechanism _does not_ uninstall the
handling function after a signal fires. Also, you could have an entire
discussion on the proper use of signals within multithreaded applications, and
there is no mention of threads in this tutorial (because it's dated 1997).

~~~
caf
Some would say that if signals are the answer, the question must be wrong.

~~~
derefr
"How do you uniformly and asynchronously request that a process clean up its
resources and exit, when e.g. the hardware is about to shut off?" That doesn't
sound like a bad question to me.

------
bryansum
A much more recent version of this is available @
<http://beej.us/guide/bgipc/output/html/multipage/index.html>

------
andrewcooke
i used this last week! i was working out how best to coordinate access to a
gpu (opencl) and decided on ipc - the shared memory messaging reduces overhead
on the host, and we can have a bunch of processes running on different cores
on the cpu all feeding to the gpu when appropriate. this was the best
background on ipc i found.

(incidentally - does the above make sense? i am new to both gpus and ipc...)

------
chasingsparks
I'm up-voting in homage to nostalgia. I still remember being giddy the first
time I read Beej's network programming. Oh, innocence.

~~~
bretpiatt
I'll agree with the nostalgia, bringing me back to college. I was at Chico
with him. I however don't miss HPUX, I do miss my Slackware though.

------
yan
Wow seeing "Beej's" made me feel nostalgic.

------
acg
Out of date lecture notes with what looks like a bias for HP-UX. There are
better sources of information.

~~~
daleharvey
can you provide the links to the better sources? otherwise this isnt a very
useful comment.

~~~
acg
Sorry, I was trying to be concise. I'll aim to be useful. I think the guide as
it is, is not only old but incomplete and mostly points to man pages. It's
saving grace is the examples, which could easily be taken from a code search.

The Stevens Unix network programming is a better source if you have it. Vendor
documentation is often better too. Say you were interested in SYSV IPC:

[http://www.ibiblio.org/pub/Linux/docs/LDP/programmers-
guide/...](http://www.ibiblio.org/pub/Linux/docs/LDP/programmers-
guide/lpg-0.4.pdf) [http://www.advancedlinuxprogramming.com/alp-folder/alp-
ch05-...](http://www.advancedlinuxprogramming.com/alp-folder/alp-ch05-ipc.pdf)
<http://developers.sun.com/solaris/articles/named_pipes.html>
<http://www.ibm.com/developerworks/aix/library/au-ipc/>

Working code like the APR is worth reading for portability issues,
particularly with sockets. I'm sure there are many other examples.

Given all this would you really use this guide when writing code?

------
JulianMorrison
SysV IPC has message queues? I didn't know that, that looks useful.

------
mauriez
I remember printing that. Thanks for the blast from the past! :)

------
d0m
That's where I have learned what a socket was many years ago :)

------
chanux
Wish if Beej's guides were continued. They are 'cool'.

------
gometro33
I remember _my_ first UDP packet...

