Not the OP, but the historical answer was POSIX (https://en.wikipedia.org/wiki/POSIX, https://dl.acm.org/doi/10.1109/2.56856).
That didn’t work perfectly, but it did work to some extent.