mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-27 15:52:28 +00:00
Release Cosmopolitan v3.2
This commit is contained in:
parent
873069fcd7
commit
a3deef70c2
11 changed files with 75 additions and 18 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue