Re:Where do argc and argv come from?
by segfaultbuserr on Monday August 10, 2020 @04:48PM
(#24113812)
Modifying argv is a classic trick to implement an "error log of last resort" - How can you log an error message when the I/O itself has failed (e.g. the disk is full)? You can write you message to argv. A sysadmin running ps can quickly spot a "FATAL ERROR OCCURRED" argument appears next to the program name. Famously used by DJB in his mail server.
[ Parent
| on HN ]
There are no comments on this comment yet.