If you ever have the need to represent a date/time (or part of a date/time) as a string for programmatic rather than human consumption (e.g. you are defining a save file format or a network protocol), please use ISO 8601 unless you have a very strong reason not to.
For more information, please read what the W3C has to say about ISO 8601 style date and time formats.
I recently received a bug report for my quick-and-dirty TCP debugging tool tcpconndbg where it was creating a large number of zombie processes. The person who filed the bug, Peter Viskup, was even kind enough to send a patch. While this is old news to anyone with extensive Unix programming experience, always remember the following:
If you create a child process using
fork(), you must either:
- Explicitly retrieve the child process’s exit code using one of the
wait() functions (e.g.
- Tell the system that you aren’t interested in the child process’s exit code by using either:
sigaction() with the
SA_NOCLDWAIT parameter (preferred)
signal(SIGCHILD, SIG_IGN); (for systems which do not support
As I fixed this bug, I realized I hadn’t looked at tcpconndbg in 5 years. My how programming style changes…