cosmopolitan/libc/proc/describefds.internal.h
Justine Tunney 3f26dfbb31
Share file offset across execve() on Windows
This is a breaking change. It defines the new environment variable named
_COSMO_FDS_V2 which is used for inheriting non-stdio file descriptors on
execve() or posix_spawn(). No effort has been spent thus far integrating
with the older variable. If a new binary launches the older ones or vice
versa they'll only be able to pass stdin / stdout / stderr to each other
therefore it's important that you upgrade all your cosmo binaries if you
depend on this functionality. You'll be glad you did because inheritance
of file descriptors is more aligned with the POSIX standard than before.
2024-08-03 17:48:00 -07:00

15 lines
579 B
C

#ifndef COSMOPOLITAN_LIBC_PROC_DESCRIBEFDS_INTERNAL_H_
#define COSMOPOLITAN_LIBC_PROC_DESCRIBEFDS_INTERNAL_H_
#include "libc/intrin/fds.h"
#include "libc/nt/struct/startupinfo.h"
COSMOPOLITAN_C_START_
#define CURSOR_ADDRESS_FLAG 0x4000000000000000
bool __is_cloexec(const struct Fd *) libcesque;
void __undescribe_fds(int64_t, int64_t *, uint32_t) libcesque;
char *__describe_fds(const struct Fd *, size_t, struct NtStartupInfo *, int64_t,
int64_t **, uint32_t *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_PROC_DESCRIBEFDS_INTERNAL_H_ */