我环境中的 realpath() 不喜欢 NULL 作为第二个参数?

realpath() in my env doesn't like NULL as second argument?

我在 linux 盒子上 /proc/self/exe 似乎得到支持:

但是:

if (NULL == realpath("/proc/self/exe", NULL))
{
  printf("this prints unexpectedly, %s\n", strerror(errno));
}

此时,errno22,我看到了Invalid argument。为什么?或者——如何找出原因?

man realpath 所述:

,此行为将发生在低于 2.3 的 glibc 版本上

ERRORS
............
EINVAL - path is NULL. (In glibc versions before 2.3, this error is also returned if resolved_path is NULL.)