What happens when wsl runs swoole, and finds that the signalfd function doesn't exist?

< H1 > Code < / H1 >

is to run a http server

<?php

$http = new swoole_http_server("127.0.0.1", 9501);

$http->on("request", function ($request, $response) {
    $response->end("<h1>Hello Swoole. -sharp".rand(1000, 9999)."</h1>");
});
$http->start();
< H1 > warning < / H1 >
[2018-05-25 15:01:13 @17.0]     WARNING swSignalfd_setup: signalfd() failed. Error: Function not implemented[38]
[2018-05-25 15:01:13 *23.0]     WARNING swSignalfd_setup: signalfd() failed. Error: Function not implemented[38]

you can also access localhost, responses. This warning has no impact on development, does it? I don"t know what this function does.

Mar.14,2021

this issue has already been mentioned in Swoole about issue.

may be caused by a higher version of the gcc+ lower version of the kernel. There is a function for signalfd in libc, but the linux kernel does not support it. You can modify Makefile, remove HAVE_SIGNALFD or upgrade the Linux kernel.

you can take a look at this question .

Menu