Release Cosmopolitan v3.2

This commit is contained in:
Justine Tunney 2024-01-04 08:25:37 -08:00
parent 873069fcd7
commit a3deef70c2
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
11 changed files with 75 additions and 18 deletions

View file

@ -18,7 +18,9 @@
*/
#include "libc/calls/calls.h"
#include "libc/calls/metalfile.internal.h"
#include "libc/calls/syscall-nt.internal.h"
#include "libc/calls/syscall-sysv.internal.h"
#include "libc/calls/syscall_support-sysv.internal.h"
#include "libc/dce.h"
#include "libc/limits.h"
#include "libc/runtime/runtime.h"
@ -58,7 +60,13 @@ void SetUpOnce(void) {
__attribute__((__constructor__)) static void Child(int argc, char *argv[]) {
if (argc >= 2 && !strcmp(argv[1], "Child")) {
if (sys_chdir("/")) {
int rc;
if (!IsWindows()) {
rc = sys_chdir("/");
} else {
rc = sys_chdir_nt("/");
}
if (rc) {
exit(122);
}
if (strcmp(argv[2], GetProgramExecutableName())) {
@ -105,6 +113,13 @@ TEST(GetProramExecutableName, weirdArgv0NullEnv) {
TEST(GetProgramExecutableName, movedSelf) {
if (skiptests) return;
if (IsAarch64() && IsQemu()) {
// clang-format off
// TODO(mrdomino): fix: make -j8 m=aarch64 o/aarch64/test/libc/calls/getprogramexecutablename_test.com.ok
// possibly related to the intersection of binfmt_misc and qemu-aarch64
// clang-format on
return;
}
char buf[BUFSIZ];
ASSERT_SYS(0, 3, open(GetProgramExecutableName(), O_RDONLY));
ASSERT_SYS(0, 4, creat("test", 0755));