Dear All, Notes from today's class are in the course directory, as follows: Signals: signals.txt, signals/sig.c Kmem/DTrace: kmem/ (scripts and their output with comments, compressed) ------ Also, I think I misspoke about the handler's function-pointer type in the signal(2) example. More carefully, looking at the signal(2) manpage (or Linux's http://man7.org/linux/man-pages/man2/signal.2.html for reference): "signal() returns the previous value of the signal handler, or SIG_ERR on error." The type of the handler is void (*handler)(int) ---a function that takes a single int argument and doesn't have a return value. So the type of signal() is "a function that returns a function pointer to a function that takes an int and returns void, and takes an int and a void (*handler)(int) as arguments". So it is written as: void ( *signal(int signum, void (*handler)(int)) ) (int); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^ where the ^^^-underlined specifies the arguments of the _returned_ function pointer type, and ~~~-underlined specifies the argument types of the signal function itself. As usual, stackoverflow has all kind of fun examples: http://stackoverflow.com/questions/840501/how-do-function-pointers-in-c-work including the answer called "The guide to getting fired". One answer explains how to read the function pointer expressions "top down" and "bottom up". I thought that one useful. Another useful example is http://c.learncodethehardway.org/book/ex18.html Thanks, --Sergey