diff options
author | Andy Green <andy@warmcat.com> | 2020-02-12 10:12:39 +0000 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2020-02-21 17:32:41 +0000 |
commit | 8a7e0edb7d59f1545ef8f655124d157a04b15581 (patch) | |
tree | 6ed85704bfa88a21076b58d4f4ce7e100629c35f /CMakeLists.txt | |
parent | 1194b4ddfd59de94cb1c8c812dbf26cfe391a6bd (diff) | |
download | libwebsockets-8a7e0edb7d59f1545ef8f655124d157a04b15581.tar.gz |
lws_spawn_piped: break out from cgi
The vfork optimized spawn, stdxxx and terminal handling in the cgi
implementation is quite mature and sophisticated, and useful for
other things unrelated to cgi. Break it out into its own public
api under LWS_WITH_SPAWN, off by default.
Expand it so the parent wsi is optional, and the role and protocol
bindings for stdxxx pipes can be set. Allow optional sul timeout
and external lws_dll2 owner for extant children.
Remove inline style from minimal http-server-cgi
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 86924543..8d97927b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,6 +150,7 @@ option(LWS_CLIENT_HTTP_PROXYING "Support external http proxies for client connec option(LWS_WITH_FILE_OPS "Support file operations vfs" ON) option(LWS_WITH_DETAILED_LATENCY "Record detailed latency stats for each read and write" OFF) option(LWS_WITH_UDP "Platform supports UDP" ON) +option(LWS_WITH_SPAWN "Spawn subprocesses with piped stdin/out/stderr" OFF) # # to use miniz, enable both LWS_WITH_ZLIB and LWS_WITH_MINIZ @@ -195,6 +196,9 @@ if (LWS_FOR_GITOHASHI) set(LWS_WITH_DISKCACHE 1) set(LWS_WITH_LWSAC 1) set(LWS_WITH_LEJP_CONF 1) + set(LWS_WITH_SPAWN 1) + set(LWS_WITH_STRUCT_JSON 1) + set(LWS_WITH_STRUCT_SQLITE3 1) endif() if(LWS_WITH_DISTRO_RECOMMENDED) @@ -225,6 +229,9 @@ if(LWS_WITH_DISTRO_RECOMMENDED) set(LWS_ROLE_RAW_PROXY 1) set(LWS_WITH_GENCRYPTO 1) set(LWS_WITH_JOSE 1) + set(LWS_WITH_STRUCT_JSON 1) + set(LWS_WITH_STRUCT_SQLITE3 1) + set(LWS_WITH_SPAWN 1) endif() if (NOT LWS_WITH_NETWORK) @@ -253,6 +260,10 @@ if (NOT LWS_WITH_NETWORK) set(LWS_WITH_THREADPOOL 0) endif() +if (LWS_WITH_CGI) + set(LWS_WITH_SPAWN 1) +endif() + if (LWS_WITH_STRUCT_SQLITE3) set(LWS_WITH_SQLITE3 1) endif() @@ -1040,6 +1051,11 @@ set(SOURCES lib/misc/lws-ring.c ) +if (LWS_WITH_SPAWN) + list(APPEND SOURCES lib/misc/spawn.c) +endif() + + if (LWS_WITH_FILE_OPS) list(APPEND SOURCES lib/core/vfs.c) endif() |