mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-03 16:30:29 +00:00
Make improvements
- Add rusage to redbean Lua API - Add more redbean documentation - Add pledge() to redbean Lua API - Polyfill OpenBSD pledge() for Linux - Increase PATH_MAX limit to 1024 characters - Untrack sibling processes after fork() on Windows
This commit is contained in:
parent
9a6bd304a5
commit
47b3274665
212 changed files with 2251 additions and 834 deletions
|
@ -18,6 +18,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/safemacros.internal.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "net/https/sslcache.h"
|
||||
|
||||
|
@ -26,10 +27,10 @@
|
|||
* @return pointer to static memory
|
||||
*/
|
||||
char *GetSslCacheFile(void) {
|
||||
static char sslcachefile[PATH_MAX + 1];
|
||||
static char sslcachefile[PATH_MAX];
|
||||
if (snprintf(sslcachefile, sizeof(sslcachefile), "%s/%s.sslcache",
|
||||
firstnonnull(getenv("TMPDIR"), "/tmp"),
|
||||
getenv("USER")) <= PATH_MAX) {
|
||||
getenv("USER")) < ARRAYLEN(sslcachefile)) {
|
||||
return sslcachefile;
|
||||
} else {
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue