检查从/ usr / bin中/ LDD源,我看到它使用LD-linux下找到一个可执行文件的依赖,但它首先调用LD-Linux下--verify说法。 然后脚本根据LD-linux的--verify通话的退出代码的作用是不同的。
为LD-Linux上的man页面不提供退出代码的任何信息,而谷歌搜索变成有价值的东西。 有一些文件(不是通过看LD-Linux的源代码等),提供对LD-Linux的退出代码--verfify及其各自的含义列表的任意位置?
检查从/ usr / bin中/ LDD源,我看到它使用LD-linux下找到一个可执行文件的依赖,但它首先调用LD-Linux下--verify说法。 然后脚本根据LD-linux的--verify通话的退出代码的作用是不同的。
为LD-Linux上的man页面不提供退出代码的任何信息,而谷歌搜索变成有价值的东西。 有一些文件(不是通过看LD-Linux的源代码等),提供对LD-Linux的退出代码--verfify及其各自的含义列表的任意位置?
我没有找到任何文件,但是...
if (__builtin_expect (mode, normal) == verify)
{
/* We were called just to verify that this is a dynamic
executable using us as the program interpreter. Exit with an
error if we were not able to load the binary or no interpreter
is specified (i.e., this is no dynamically linked binary. */
if (main_map->l_ld == NULL)
_exit (1);
/* We allow here some platform specific code. */
#ifdef DISTINGUISH_LIB_VERSIONS
DISTINGUISH_LIB_VERSIONS;
#endif
_exit (has_interp ? 0 : 2);
}
所以...
有没有其他的代码。
我做了一些实验和退出状态是零,在成功1失败。 这包括怪诞滥用如问它来验证一个shell脚本。
你会很安全的假设零成功,非零失败,并没有其他信息。