Opcode wrote:How would I properly use the Linux chmod_() function. I tried once and it completely destroyed my Linux install.
...
I tried chmod once again and like last time it bricked my Ubuntu install (had to reinstall, again...)
If you think some code to test can be risky, consider using a virtual machine. At the touch of a button you can restore its previous state without reinstalling.
On a real OS, often another terminal already open with a root account or a sudo it's enough to repair most of the damage one can usually do.
In case that fails, it's a good idea to have a complete image made before. Restoring an image is quicker and less tedious than reinstalling the OS, configuring it , updating it and finally reinstalling all the required programs.
Opcode wrote:
I think strtol() and strtoul() are both bugged. Both with normal and su privileges return 0 on Ubuntu 14.04.1 LTS.
Two of the most simple and widely used C library functions bugged.... do you think is likely ?
Or are you compiling with Unicode enabled ?
Code: Select all
long int strtol(const char *nptr, char **endptr, int base);
If that is the problem, you could try to override the PB import, or compile in ascii.
Code: Select all
ImportC ""
strtol_(nptr.p-utf8, *endptr, base) As "strtol"
EndImport
Code: Select all
Debug strtol_("0755", 0, 8) ; 0 in unicode
Debug strtol_("0755", 0, 8) ; 493 in unicode with the fixed import
I hope when PB will drop ascii mode all the Linux imports will be fixed.