Re: RFE: .so filters

2014-01-10 Thread Jason A. Donenfeld
On Fri, Jan 10, 2014 at 10:06 AM, John Keeping j...@keeping.me.uk wrote: This seems drastically over complicated. So here's the situation. There's a lot of state that we're taking advantage of in using processes that terminate, that needs to be replicated: *a* Sending arguments to the

Re: RFE: .so filters

2014-01-10 Thread John Keeping
On Fri, Jan 10, 2014 at 06:12:25PM +0100, Florian Pritz wrote: On 10.01.2014 16:57, Jason A. Donenfeld wrote: On Fri, Jan 10, 2014 at 10:06 AM, John Keeping j...@keeping.me.uk wrote: This seems drastically over complicated. So here's the situation. There's a lot of state that we're

Re: RFE: .so filters

2014-01-10 Thread Jason A. Donenfeld
On Fri, Jan 10, 2014 at 6:20 PM, John Keeping j...@keeping.me.uk wrote: I was also wondering if supporting unix:/path/to/socket would be useful, then the filter would connect on a Unix socket, run and disconnect, on the assumption that the administrator has a daemon running to do the

Re: RFE: .so filters

2014-01-10 Thread Florian Pritz
On 10.01.2014 18:57, Jason A. Donenfeld wrote: On Fri, Jan 10, 2014 at 6:12 PM, Florian Pritz bluew...@xinu.at wrote: Isn't this (fast scripting with lots of features) when people normally start using lua? This would have the same challenges as using .so files, w.r.t. hooking write() (or

Re: RFE: .so filters

2014-01-10 Thread John Keeping
On Fri, Jan 10, 2014 at 09:03:24PM +0100, Florian Pritz wrote: On 10.01.2014 18:57, Jason A. Donenfeld wrote: On Fri, Jan 10, 2014 at 6:12 PM, Florian Pritz bluew...@xinu.at wrote: Isn't this (fast scripting with lots of features) when people normally start using lua? This would

Re: RFE: .so filters

2014-01-10 Thread Florian Pritz
On 10.01.2014 21:11, John Keeping wrote: Forking and using Lua in the child is an interesting idea. I need to investigate how Lua generally deals with I/O, but it feels like it will be simpler to use a simple function interface than deal with slurping in the input in Lua. Looks rather easy

Re: RFE: .so filters

2014-01-09 Thread John Keeping
On Thu, Jan 09, 2014 at 10:34:26PM +0100, Jason A. Donenfeld wrote: I'm thinking about this filtering situation w.r.t. gravatar and potentially running multiple filters on one page. Something I've been considering is implementing a simple dlopen() mechanism for filters, if the filter filename

Re: RFE: .so filters

2014-01-09 Thread Jason A. Donenfeld
On Fri, Jan 10, 2014 at 3:11 AM, Jason A. Donenfeld ja...@zx2c4.com wrote: Problems abound. This has race condition issues, where the parent process will SIGSTOP the child before the child can write its output. This could be fixed with a more complicated signaling protocol, but that's more