Thursday, February 7, 2008

DPS912 Lecture 6

Lots of Review on Network Sockets. stdout is buffered, if you need to make sure that printf actually prints uses fflush.

Went over the Assignment

Signals

Signals are sometimes called interrupts. They interrupt the normal flow of the program. CTRL+Z or CTRL+C. You have no idea when they will occur.

Processes can send other processes signals if they have permission. Most singnals have a default behaviour, and processes can be programmed to change the default behavior (eg ignore the signal)

you can set a signal handler using the following functions

signal() - easier but deprecated

sigaction() - harder but modern. It can do more stuff

No comments: