3 ms·
Very nice. I had cobbled up a "one liner" (sort of) gawk webserver on here a couple a months ago: https://news.ycombinator.com/item?id=22085459 https://news.yc
by tyingq 7y ago
Very nice. I had cobbled up a "one liner" (sort of) gawk webserver on here a couple a months ago: https://news.ycombinator.com/item?id=22085459 https://news.ycombinator.com/item?id=22085459
I tried making it scalable, but unfortunately, the server sockets in gawk don't set SO_REUSEPORT. So, I can't fork usable children. It does work if you use LD_PRELOAD tricks, or edit the gawk binary to change SO_REUSEADDR to SO_REUSEPORT, but both are pretty hacky.
If gawk would separate the listen() and accept() calls out, you could do a lot more with their server socket code.
- asicsp 7y agoimpressive, if I use -o option to get a pretty printed version, it comes to 68 lines
- obituary_latte 7y agoVery cool. Works on iOS with iSH surprisingly. FOUND index.html FOUND favicon.ico
- tyingq 7y agoOh wow. I wouldn't have guessed iSH would have packaged up the extensions I'm using.
- obituary_latte 7y agoHad to `apk add gawk` is all.