Better check, better comment, TODO

This commit is contained in:
Jōshin 2023-12-17 14:27:36 +00:00
parent 6a54af569e
commit 6b638e9d2e
No known key found for this signature in database

View file

@ -36,8 +36,12 @@ void SetUpOnce(void) {
__attribute__((__constructor__)) static void Child(int argc, char *argv[]) {
static bool skiparg0tests;
if (IsLinux()) {
/* see also: https://github.com/jart/cosmopolitan/issues/1014 */
if (!IsXnuSilicon()) {
/* TODO(mrdomino): these tests only pass on XnuSilicon right now because
__sys_execve fails there, so the ape loader is used.
the correct check here is "we have been invoked either
as an assimilated binary or via the ape loader, and not
via a raw __sys_execve." */
skiparg0tests = true;
if (argc < 2) {
fprintf(stderr, "warning: skipping argv[0] tests\n");