{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1745906062,
"reponame":"libwebsockets",
"desc":"libwebsockets lightweight C networking library",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"d4dfa4c136fa46e7147a1fd0a49dbc2a",
"commit": {"type":"commit",
"time": 1495238727,
"time_ofs": 480,
"oid_tree": { "oid": "95b1bb205731fc8ab47e019d736aca2b45509732", "alias": []},
"oid":{ "oid": "a369b429102f108653c8fd2aca8b1209c99849e0", "alias": []},
"msg": "cgi: close unforked std fds",
"sig_commit": { "git_time": { "time": 1495238727, "offset": 480 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },
"sig_author": { "git_time": { "time": 1495238727, "offset": 480 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }},
"body": "cgi: close unforked std fds"
,
"diff": "diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c\nindex 11f73d5..288c3df 100755\n--- a/lib/libwebsockets.c\n+++ b/lib/libwebsockets.c\n@@ -2506,11 +2506,13 @@ lws_cgi(struct lws *wsi, const char * const *exec_array, int script_uri_path_len\n \t * process is OK. Stuff that happens after the execvpe() is OK.\n \t */\n \n-\tfor (n \u003d 0; n \u003c 3; n++)\n+\tfor (n \u003d 0; n \u003c 3; n++) {\n \t\tif (dup2(cgi-\u003epipe_fds[n][!(n \u003d\u003d 0)], n) \u003c 0) {\n \t\t\tlwsl_err(\u0022%s: stdin dup2 failed\u005cn\u0022, __func__);\n \t\t\tgoto bail3;\n \t\t}\n+\t\tclose(cgi-\u003epipe_fds[n][!(n \u003d\u003d 0)]);\n+\t}\n \n #if !defined(LWS_HAVE_VFORK) || !defined(LWS_HAVE_EXECVPE)\n \tfor (m \u003d 0; m \u003c n; m++) {\n","s":{"c":1745764656,"u": 5262}}
],"g": 872,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "7d0a"}