It's a little different from what the OP was asking for, but my favorite toy programming project: write a shell. This brings you in contact with many of the basic aspects of the Unix system: pipes, fork, exec, environment variables. In around a thousand lines, you can implement a shell with pipes, backgrounding, backquote, variable expansion, conditionals, looping, and lots and lots of bugs.
In general, I like the idea of trying to implement absolutely minimal versions of common programs. Other possibilities are: an HTTP server or proxy, a Lisp interpreter.