3 ms·
> Targeting POSIX is just like trying to make HTML/CSS/JS, it works as long as everyone uses Chrome, sorry GNU/Linux. That's a bad analogy IMO. GNU/Linux is mo
by MayeulC 5y ago
> Targeting POSIX is just like trying to make HTML/CSS/JS, it works as long as everyone uses Chrome, sorry GNU/Linux.
That's a bad analogy IMO. GNU/Linux is mostly POSIX compliant. There are some edge cases one runs into with C programming, but if talking about shell scripting, sticking to POSIX is definitely more portable. Bash would be a chrome equivalent, otherwise it's like targeting a subset of what every browser can do. Testing against Busybox/musl (Alpine) is a good way to assess portability.
- pjmlp 5y agoTry to fork in a POSIX compliant way an application using signals and threads, across several UNIX implementations. Or asynchronous network programming with certificates, while using only POSIX APIs. Dealing with filesystem capabilities, file locations, daemon configurations, port management utilities,... Ah, and anything GUI related is not even part of POSIX.
- lmm 5y agoAs a FreeBSD user, I don't think I ever had a C program that didn't advertise being tested on FreeBSD work first time. There's no test suite to verify that you've used only the POSIX subset of what Linux provides, and it's not something you're going to get right solely by trying, no matter how careful a programmer you are.