logoalt Hacker News

prewetttoday at 4:04 AM3 repliesview on HN

Not the GP, but I have one non-partioning AIX trivia I discovered by accident. Turns out that malloc(0) returns NULL on AIX, but non-null on Linux, SunOS, and Irix. (I was surprised multiple ways on that one!)


Replies

doubled112today at 4:13 AM

Sometimes I think "it's a UNIX system, I know this" but I've been caught by subtle differences before too.

killall is very different between Linux and Solaris, for example. I would rather have not found this out on a client machine for the first time.

mjevanstoday at 4:18 AM

Now that you know, can you conceptualize reasons why each pattern might be a correct preference? Among those reasons, which would you prefer as a system?

^^^ THAT is how an Interview Question should work around this factoid.

shaknatoday at 4:08 AM

That one has bitten me more than once