gmux 0.1.0
Linux on Cloudflare Workers
Loading...
Searching...
No Matches
unistd.h
1// wasm cannot return twice from one call, so vfork is a setjmp in the caller:
2// the child runs on, and the parent comes back to the setjmp with the child's
3// pid (src/gmux/vfork.c)
4#include_next <unistd.h>
5
6#ifndef __GMUX_UNISTD_H
7 #define __GMUX_UNISTD_H
8 #include <setjmp.h>
9struct __jmp_buf_tag* __gmux_vfork_slot(void);
10pid_t __gmux_vfork_result(int);
11 #define vfork() __gmux_vfork_result(setjmp(__gmux_vfork_slot()))
12#endif