Make fixes and improvements

- Document more compiler flags
- Expose new __print_maps() api
- Better overflow checking in mmap()
- Improve the shell example somewhat
- Fix minor runtime bugs regarding stacks
- Make kill() on fork()+execve()'d children work
- Support CLONE_CHILD_CLEARTID for proper joining
- Fix recent possible deadlock regression with --ftrace
This commit is contained in:
Justine Tunney 2022-05-19 16:57:49 -07:00
parent 6e52cba37a
commit ec2cb88058
68 changed files with 1211 additions and 431 deletions

View file

@ -1,6 +1,7 @@
#ifndef COSMOPOLITAN_LIBC_NT_PROCESS_H_
#define COSMOPOLITAN_LIBC_NT_PROCESS_H_
#include "libc/nt/startupinfo.h"
#include "libc/nt/struct/processentry32.h"
#include "libc/nt/struct/processinformation.h"
#include "libc/nt/struct/processmemorycounters.h"
#include "libc/nt/struct/securityattributes.h"
@ -73,6 +74,10 @@ bool32 GetProcessMemoryInfo(
int64_t hProcess, struct NtProcessMemoryCountersEx *out_ppsmemCounters,
uint32_t cb);
int64_t CreateToolhelp32Snapshot(uint32_t dwFlags, uint32_t th32ProcessID);
bool32 Process32First(int64_t hSnapshot, struct NtProcessEntry32 *in_out_lppe);
bool32 Process32Next(int64_t hSnapshot, struct NtProcessEntry32 *out_lppe);
#if ShouldUseMsabiAttribute()
#include "libc/nt/thunk/process.inc"
#endif /* ShouldUseMsabiAttribute() */