| kale ( @ 2009-02-15 07:36:00 |
Linux tip-of-the-day
For some reason, I always thought that `perror' was solely for MySQL errors, since it comes with MySQL.
I AM A FOOL.
From the man page:
Very handy for interpretting strace output. Also of note -- you can man syscalls like getsockopt and whatnot -- also useful for strace. In fact, here's a handy chart about the man page sections, which always made me wonder what they are, so I looked them up and found a pretty chart:
For some reason, I always thought that `perror' was solely for MySQL errors, since it comes with MySQL.
I AM A FOOL.
From the man page:
DESCRIPTION
For most system errors, MySQL displays, in addition to an internal text message, the system error code in one of the following styles:
message ... (errno: #)
message ... (Errcode: #)
You can find out what the error code means by examining the documentation for your system or by using the perror utility.
perror prints a description for a system error code or for a storage engine (table handler) error code.
Very handy for interpretting strace output. Also of note -- you can man syscalls like getsockopt and whatnot -- also useful for strace. In fact, here's a handy chart about the man page sections, which always made me wonder what they are, so I looked them up and found a pretty chart:
| Section # | Topic |
|---|---|
| 1 | Commands available to users |
| 2 | Unix and C system calls |
| 3 | C library routines for C programs |
| 4 | Special file names |
| 5 | File formats and conventions for files used by Unix |
| 6 | Games |
| 7 | Word processing packages |
| 8 | System administration commands and procedures |