문제

In Linux, in Perl, using the FCGI module, using the Open Socket function, is it possible to create an unix domain sockets using abstract names?

I tried to create a socket starting with a null character \0wibble \zwibble \x{0}wibble and it didn't work!

It worked only using pathname, as described in unix(7):

$socket = FCGI::OpenSocket( "/tmp/wibble", 10 );

Thank you!

도움이 되었습니까?

해결책

The implementation underlying FCGI::OpenSocket() doesn't support it.

That call ultimately calls a C function int OS_CreateLocalIpcFd(const char *bindPath, int backlog). You can immediately infer that the bindPath argument is understood as a NUL-terminated, rather than a NUL-prefixed, string.

If you could supply your own socket to FCGI.pm, you might have a chance at making this work.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top