@@ -241,7 +241,7 @@ EM_JS(int, wasm_poll_socket, (php_socket_t socketd, int events, int timeout), {
241
241
if (stream .stream_ops ?.poll ) {
242
242
mask = stream .stream_ops .poll (stream , -1 );
243
243
}
244
-
244
+
245
245
mask &= events | POLLERR | POLLHUP ;
246
246
if (mask ) {
247
247
return mask ;
@@ -418,7 +418,7 @@ EM_JS(__wasi_errno_t, js_fd_read, (__wasi_fd_t fd, const __wasi_iovec_t *iov, si
418
418
HEAPU32 [pnum >> 2 ] = num ;
419
419
return wakeUp (returnCode );
420
420
}
421
-
421
+
422
422
// It's a blocking stream and we Blocking stream with no data available yet.
423
423
// Let's poll up to a timeout.
424
424
await new Promise (resolve = > setTimeout (resolve , interval ));
@@ -1026,8 +1026,8 @@ int main(int argc, char *argv[]);
1026
1026
int run_cli ()
1027
1027
{
1028
1028
// See wasm_sapi_request_init() for details on why we need to redirect stdout and stderr.
1029
- stdout_replacement = redirect_stream_to_file (stdout , "/internal /stdout" );
1030
- stderr_replacement = redirect_stream_to_file (stderr , "/internal /stderr" );
1029
+ stdout_replacement = redirect_stream_to_file (stdout , "/request /stdout" );
1030
+ stderr_replacement = redirect_stream_to_file (stderr , "/request /stderr" );
1031
1031
if (stdout_replacement == -1 || stderr_replacement == -1 )
1032
1032
{
1033
1033
return -1 ;
@@ -1337,7 +1337,7 @@ void wasm_set_request_port(int port)
1337
1337
*
1338
1338
* stream: The stream to redirect, e.g. stdout or stderr.
1339
1339
*
1340
- * path: The path to the file to redirect to, e.g. "/internal /stdout".
1340
+ * path: The path to the file to redirect to, e.g. "/request /stdout".
1341
1341
*
1342
1342
* returns: The exit code: 0 on success, -1 on failure.
1343
1343
*/
@@ -1559,11 +1559,11 @@ int wasm_sapi_request_init()
1559
1559
// Write to files instead of stdout and stderr because Emscripten truncates null
1560
1560
// bytes from stdout and stderr, and null bytes are a valid output when streaming
1561
1561
// binary data.
1562
- // We use our custom Emscripten-defined /internal /std* devices and handle the output in JavaScript.
1562
+ // We use our custom Emscripten-defined /request /std* devices and handle the output in JavaScript.
1563
1563
// These /internal devices are not thread-safe and should always stay in per-process MEMFS space.
1564
1564
// Sharing them between PHP instances may cause intertwined output.
1565
- stdout_replacement = redirect_stream_to_file (stdout , "/internal /stdout" );
1566
- stderr_replacement = redirect_stream_to_file (stderr , "/internal /stderr" );
1565
+ stdout_replacement = redirect_stream_to_file (stdout , "/request /stdout" );
1566
+ stderr_replacement = redirect_stream_to_file (stderr , "/request /stderr" );
1567
1567
if (stdout_replacement == -1 || stderr_replacement == -1 )
1568
1568
{
1569
1569
return -1 ;
@@ -1821,7 +1821,7 @@ FILE *headers_file;
1821
1821
*/
1822
1822
static int wasm_sapi_send_headers (sapi_headers_struct * sapi_headers TSRMLS_DC )
1823
1823
{
1824
- headers_file = fopen ("/internal /headers" , "w" );
1824
+ headers_file = fopen ("/request /headers" , "w" );
1825
1825
if (headers_file == NULL )
1826
1826
{
1827
1827
return FAILURE ;
0 commit comments