mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Fix handling of paths with dirfd on Windows
This change fixes an issue with all system calls ending with *at(), when the caller passes `dirfd != AT_FDCWD` and an absolute path. It's because the old code was turning paths like C:\bin\ls into \\C:\bin\ls\C:\bin\ls after being converted from paths like /C/bin/ls. I noticed this when the Emacs dired mode stopped working. It's unclear if it's a regression with Cosmopolitan Libc or if this was introduced by the Emacs v29 upgrade. It also impacted posix_spawn() for which a newly minted example now exists.
This commit is contained in:
parent
a089c07ddc
commit
39e7f24947
10 changed files with 373 additions and 46 deletions
|
@ -12,7 +12,8 @@
|
|||
#define POSIX_SPAWN_SETSCHEDPARAM 16
|
||||
#define POSIX_SPAWN_SETSCHEDULER 32
|
||||
#define POSIX_SPAWN_SETSID 128
|
||||
#define POSIX_SPAWN_SETRLIMIT 256
|
||||
#define POSIX_SPAWN_SETRLIMIT_NP 256
|
||||
#define POSIX_SPAWN_USEFORK 512
|
||||
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
|
@ -55,10 +56,10 @@ int posix_spawnattr_getsigdefault(const posix_spawnattr_t *,
|
|||
sigset_t *) libcesque;
|
||||
int posix_spawnattr_setsigdefault(posix_spawnattr_t *,
|
||||
const sigset_t *) libcesque;
|
||||
int posix_spawnattr_getrlimit(const posix_spawnattr_t *, int,
|
||||
struct rlimit *) libcesque;
|
||||
int posix_spawnattr_setrlimit(posix_spawnattr_t *, int,
|
||||
const struct rlimit *) libcesque;
|
||||
int posix_spawnattr_getrlimit_np(const posix_spawnattr_t *, int,
|
||||
struct rlimit *) libcesque;
|
||||
int posix_spawnattr_setrlimit_np(posix_spawnattr_t *, int,
|
||||
const struct rlimit *) libcesque;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* COSMOPOLITAN_LIBC_STDIO_SPAWN_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue