lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I created a standalone version of luaprompt on a BeagleBoneBlack(ARM processor, Angström Linux). No problems with the compilation, but _any_ call instantly exited with return code 1.

After a little experimenting I found the reason: On this system getopt() returns 255 instead of 1 (IMHO a bug in the library). To work around it, I suggest changing the option parsing loop like this:

    while(1) {
        option = getopt (argc, argv, "ivphe:l:");
        if (option == -1 || option == 255) break;
	...
    }

Probably this change won't do any harm on systems where getopt returns the correct value.

Regards,
Bernd


--
http://sudrala.de