Joris Vink
b06160c768
Make sure coros are woken up on eof.
2019-03-13 15:45:55 +01:00
Joris Vink
3b4574d791
Rework pysocket async/await.
...
Attach the events directly to the pysocket data structure instead of
one event per pysocket_op.
Makes the code easier, gives us a good performance boost and reduces
the number of system calls required when doing an await on a socket.
2019-03-13 11:07:15 +01:00
Joris Vink
01f9b4fcde
Check for EAGAIN when calling connect(2).
...
Linux does this under certain conditions.
2019-03-12 20:04:08 +01:00
Joris Vink
eb9b7f7b14
explicitly include sys/types.h
...
some smaller libc variants do not include this from sys/param.h.
2019-03-06 09:29:46 +01:00
Joris Vink
61863bfd3a
kill recv() timer if we have data.
...
also reset any exception that is set when we have successfully
read data from a socket.
2019-03-04 16:37:25 +01:00
Joris Vink
a0c203f507
remove norwegian debug
2019-03-01 20:57:31 +01:00
Joris Vink
31a9a70d5a
cleanup.
2019-03-01 20:56:03 +01:00
Erik Karlsson
01c1a8f8f8
support AF_UNIX in recvfrom()/sendto() python sockets
2019-03-01 20:13:28 +01:00
Joris Vink
2057f4db58
sprinkle more kore_quiet around
2019-02-27 19:59:31 +01:00
Joris Vink
1ebd82969c
Add timeout support to proc.recv()
2019-02-26 15:22:55 +01:00
Joris Vink
f4cd70956b
Add an optional timeout to socketop.recv().
2019-02-25 10:35:00 +01:00
Joris Vink
1e7ccc2adf
remove stale python example.
2019-02-25 10:00:59 +01:00
Joris Vink
bf1e8e5ffb
bump copyright to 2019
2019-02-22 16:57:28 +01:00
Joris Vink
3dbb80463a
allow double quotes in kore.proc argument lists.
2019-02-22 16:56:34 +01:00
Joris Vink
66305e551a
sig_recv is extern'd in kore.h
2019-02-11 14:01:25 +01:00
Joris Vink
8a8b08f1e6
use %u when logging worker_rlimit_nofiles
2019-02-11 14:00:28 +01:00
Joris Vink
429159ee3c
reprime idle timer if SSL_accept() fails.
...
reported by Daniel Chavez (@dacechavez)
2019-02-08 15:40:00 +01:00
Joris Vink
8040103458
fix for multiple consumers for the async queues.
2019-01-22 11:23:59 +01:00
Joris Vink
39467847fb
remove SSL_get_verify_result() check.
...
If peer verification is turned on this becomes part of the handshake
process anyway and SSL_accept() will fail when appropriate.
2019-01-21 10:36:50 +01:00
Joris Vink
3f083d6126
deal with crls being expired / not-yet-valid.
...
if a crl is expired or not-yet-valid SSL_get_verify_result()
will return these errors too so check for them explicitly
instead of depending on X509_V_OK.
found by @dacechavez
2019-01-19 11:49:54 +01:00
Joris Vink
d1e87c1a54
deal with PyObject_CallObject() returning NULL.
2019-01-15 10:20:13 +01:00
Joris Vink
d6b05bcff7
always force reload cert so we get a new x509 store.
...
Otherwise older OpenSSL or current LibreSSL will fail to add the new
CRL as they still match on subject name rather then hash of the CRL data.
2019-01-14 20:57:40 +01:00
Joris Vink
73cdbd1a01
Let CRLs be reloadable via keymgr.
...
With these changes CRLs can be reloaded like certificates
by sending a SIGUSR1 to the parent process.
Track mtime on both certificate files and CRL files as well
and only submit them to the workers if this has changed.
2019-01-14 11:41:50 +01:00
Joris Vink
c070e77ea5
include signal.h from kore.h
2019-01-11 11:32:33 +01:00
Joris Vink
b07cc0237c
Support recvfrom()/sendto() on kore python sockets.
2019-01-08 17:49:00 +01:00
Joris Vink
7aa17df4a1
make ACCESSLOG_* unsigned
2018-12-22 10:52:57 +01:00
Joris Vink
4d184e00de
correct define number
2018-12-22 10:22:59 +01:00
Joris Vink
a868ff2b25
wrap accesslog calls in !KORE_NO_HTTP.
2018-12-22 09:41:55 +01:00
Joris Vink
9aa0e95643
Rework accesslog handling.
...
Move away from the parent constantly hitting the disk for every
accesslog the workers are sending.
The workers will now write their own accesslogs to shared
memory before the parent will pick those up. The parent
will flush them to disk once every second or if they grow
larger then 1MB.
This removes the heavy penalty for having access logs
turned on when you are dealing with a large volume
of requests.
2018-12-22 09:25:00 +01:00
Joris Vink
0d6a188b01
close fd if we're a directory in filemap.
2018-12-17 16:22:36 +01:00
Joris Vink
61b385ae11
do not set CONN_CLOSE_EMPTY for 1.0 until we reply.
2018-11-30 22:12:43 +01:00
Joris Vink
cf2e158773
3.2.0
2018-11-30 21:36:00 +01:00
Joris Vink
4f1acf7060
more intmax_t
2018-11-29 21:25:20 +01:00
Joris Vink
400521073c
better format string
2018-11-29 21:24:08 +01:00
Joris Vink
e97396366c
don't go examples clean
2018-11-29 21:18:15 +01:00
Joris Vink
418c08166a
use releng things
2018-11-29 21:13:43 +01:00
Joris Vink
af45936447
add releng-build-examples target for myself
2018-11-29 21:13:34 +01:00
Joris Vink
ed7b1019fc
add /usr/local/include
2018-11-29 21:13:19 +01:00
Joris Vink
fe52e3f4e0
update comment
2018-11-29 21:04:49 +01:00
Joris Vink
59ce048ce3
add a Makefile to build all examples.
2018-11-29 21:04:14 +01:00
Joris Vink
ccaab50410
add /usr/local/lib to tasks example.
2018-11-29 21:03:22 +01:00
Joris Vink
5da99c8860
make sse example great again
2018-11-29 21:01:08 +01:00
Joris Vink
b163d849a6
remove ktunnel example, its too old.
2018-11-29 20:45:26 +01:00
Joris Vink
91f420d94a
people keep subbing to non-mailing-list mails.
2018-11-29 15:52:40 +01:00
Joris Vink
272d659f1c
we use certain things from sys/param.h
2018-11-29 10:31:14 +01:00
Joris Vink
ce3b60b8c8
keep a reference around for tracer.
2018-11-29 09:53:26 +01:00
Joris Vink
d9f543ef5b
Allow user-supplied tracer callback.
2018-11-29 09:51:24 +01:00
Joris Vink
b400fdcd9f
include sys/param.h in python.c
2018-11-29 09:11:31 +01:00
Joris Vink
fd1ab5879d
KODEV_OUTPUT tells kodev the outdir of the binary.
...
eg:
$ env KODEV_OUTPUT=/tmp kodev build
will place the resulting binary under /tmp/<binary>
2018-11-28 14:24:42 +01:00
Joris Vink
8dd075e71c
style
2018-11-28 14:22:27 +01:00