> Hello,
>
> I like to have to very tidy and organized file structures. However,
> sometimes
> this results in very long pathnames like
> "/home/sstewartgallus/root/home/documents/public/programming/projects/websites/pally/pally/run/pally.sock"
> that very old APIs such as bind cannot necessarily handle. There is an
> ugly
> hack to work around this by opening the current working directory with
> open(".",
> 0), changing into the directory name that would hold the socket file (in
> this
> case
> "/home/sstewartgallus/root/home/documents/public/programming/projects/websites/pally/pally/run"),
> binding the socket using a relative path and then changing back into the
> old
> directory. Is this hack too ugly to implement with uwsgi currently? Also,
> is
> there a way to use a pipe instead of a unix domain socket?
>
> Thank you,
> Steven Stewart-Gallus
> _______________________________________________
>
This is the only function needed to change:
https://github.com/unbit/uwsgi/blob/master/core/socket.c#L165
but take in account that you always have a 102 chars limit.
If you want to implement it, place it under an option (like
chdir-before-unix-bind) so that by default users will get the classic
behaviour.
Regarding pipes, could you clarify ? named pipes allow only a single
direction (read or write) for each peer, instead if you mean using
directly a file descriptor, you just need --socket fd://N or simply set it
as the fd 0 (like in the fastcgi style) and do not specify --socket
(when no socket is bound, uWSGI assumes the fd 0 is the socket to use)
--
Roberto De Ioris
http://unbit.com
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi