mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Add fixes performance and static web server
This commit is contained in:
parent
b6793d42d5
commit
c45e46f871
108 changed files with 2927 additions and 819 deletions
|
@ -28,7 +28,6 @@
|
|||
static int g_pid;
|
||||
|
||||
static void __updatepid(void) {
|
||||
atfork(__updatepid, NULL);
|
||||
g_pid = __getpid();
|
||||
}
|
||||
|
||||
|
@ -47,8 +46,9 @@ int __getpid(void) {
|
|||
int getpid(void) {
|
||||
static bool once;
|
||||
if (!once) {
|
||||
once = true;
|
||||
__updatepid();
|
||||
atfork(__updatepid, NULL);
|
||||
once = true;
|
||||
}
|
||||
return g_pid;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue