Re: dup2() uses FD already allocated to NET skt

2025-06-27 Thread Tim Hardisty
Is it as "simple" as thttpd should do: nwritten= send(sock_fd, buffer, totalbytesread, 0); rather than the generic: nwritten= write(sock_fd, buffer, nbytes); On 27/06/2025 18:40, Tim Hardisty wrote: Trying to get thttpd's CGI handling working and have found that the dup(2) calls of stdin and

dup2() uses FD already allocated to NET skt

2025-06-27 Thread Tim Hardisty
Trying to get thttpd's CGI handling working and have found that the dup(2) calls of stdin and stdout return a file descriptor that's already been allocated to the NET socket (via thttpd I think). That isn't right is it? I am not sure if it's a side effect of something that thttpd does (that m

Re: uIP Webserver - CGI help needed

2025-06-27 Thread Tim Hardisty
Thanks Michael! Looks like libwebsockets *is* ported to NuttX already - but you have to enable MIT licensed software (and a few other things to do with TLS and CRYPTO stuff) first, but it could well be an option: I'll take a look :-) In the meantime I have a theory as to why the thttp CGI scr