The man page for getopt(3) says under DESCRIPTION The getopt() function returns an EOF when ... a non-recognized option is encountered. Under DIAGNOSTICS however, If the getopt() function encounters a character not found in the string optarg ... it ... returns `?' .... Fix: The actual behaviour seems to be the one described under DIAGNOSTICS. Jens -- SIGSIG -- signature too long (core dumped) How-To-Repeat: man 3 getopt
State Changed From-To: open->closed getopt(3) was updated to be consistent in how it describes its return values.