Commit Graph

643 Commits

Author SHA1 Message Date
Angus Salkeld
e4cc803a52 TEST: Use /bin/sh not /bin/bash
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-10 11:41:11 +10:00
Angus Salkeld
32f206d5d7 TEST: check for lost shared mem on bsd too
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-10 11:36:36 +10:00
Angus Salkeld
c566421df9 rb: cleanup the semaphores
- the way they are selected
- rpl_sem.c the error handling

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-10 10:39:43 +10:00
Angus Salkeld
cadffd3088 Fix some small issues in ./check
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-10 09:49:48 +10:00
Angus Salkeld
8ed5f55990 Cleanup the .gitignore files
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-09 21:43:58 +10:00
Angus Salkeld
7f7a009103 configure.ac tweaks
Thanks again to Igor Pashev.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-09 21:43:33 +10:00
Angus Salkeld
916440d08d Remove HZ and use sysconf instead.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-09 21:38:38 +10:00
Angus Salkeld
259021414a SUN_LEN() macro is present if __EXTENSIONS__ is defined on Illumos
A bit reworked but originally from Igor Pashev:
84c47f8160

Note: __EXTENSIONS__ also defines _GNU_SOURCE, so removing it as well.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-09 21:37:04 +10:00
Igor Pashev
9b3822dd2a PF_UNIX is a POSIX standard name 2012-05-09 18:56:25 +10:00
Igor Pashev
62e070a720 Test for log facility names 2012-05-09 18:56:08 +10:00
Angus Salkeld
b6945e5eb6 IPC: drop log message to debug.
this can be noisy when there are a lot of transient
connections.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-09 11:45:51 +10:00
Angus Salkeld
7c2e632be0 IPC: fix retrying of partial recv's and sends.
Move to send() instead of sendmsg() as it's easier
to track resending partial messages.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-03 21:24:02 +10:00
Angus Salkeld
c2651bb9bf IPC: initialize enough shared mem for all 3 one way connections.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-03 08:20:59 +10:00
Angus Salkeld
494293a97b IPC: keep retrying to recv the socket message if partially recv'ed (part 2)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-02 16:39:03 +10:00
Angus Salkeld
f2916c7576 IPC: keep retrying to recv the socket message if partially recv'ed
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-02 16:03:23 +10:00
Angus Salkeld
72938081c0 IPC: handle the server shutdown better
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-02 16:00:05 +10:00
Angus Salkeld
9f09aba8dd IPC: handle a connection disconnect from the server better
Only problem with SOCKET.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-02 10:15:19 +10:00
Angus Salkeld
78fb4ad682 IPC: make it possible to send events in the connected callback.
This was only a problem with QB_IPC_SOCKET.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 20:09:21 +10:00
Angus Salkeld
6b7da3f531 Add the event queue length to the connection stats.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 13:22:16 +10:00
Angus Salkeld
b29326a363 IPC: add a is_connected client side function.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 12:43:22 +10:00
Angus Salkeld
15ef4dd4ec Fix typo in ./check
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 12:15:15 +10:00
Angus Salkeld
154ccabdb5 docs: clarify the need to use request/response headers
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 12:14:58 +10:00
Angus Salkeld
4550cc9e45 Remove unused local variable
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 09:13:04 +10:00
Angus Salkeld
9e3c2ea33d IPC: change the socket recv function to read the response header.
It needs to only recv the size of this message, else we recv more
than one message and effectively drop messages (hidden at the end
of the current message).

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 15:49:42 +10:00
Angus Salkeld
e3d8078f0a Add some special commands into the ipc example
type "events" and the server will send 10 events.
type 'kill' into the client and this will simulate the server dying.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 15:49:42 +10:00
Angus Salkeld
6263e2eea6 TEST: improve the tracing in the ipc tests.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 15:49:42 +10:00
Andrew Beekhof
edcf559044 Make "make (s)rpm" work more reliably
Make sure the version number is re-calculated on each run.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 15:09:55 +10:00
Angus Salkeld
aca7bec0e8 TEST: add a test to confirm we get the events we send.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 10:04:54 +10:00
Angus Salkeld
7bd8901bdf TEST: reuse send_and_check for events.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 09:28:28 +10:00
Angus Salkeld
3f4a175312 IPC: make it possible for a root client to talk to a non-root server.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 08:25:57 +10:00
Angus Salkeld
ddcff095b5 Run ./Lindent in the examples directory
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-26 21:41:44 +10:00
Angus Salkeld
4bfe2fbd14 Add some debug code to the ipcclient example
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-26 21:36:49 +10:00
Angus Salkeld
fbd05ba1d2 IPC: make sure ipc (socket) clients can connect to a server running as root.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-26 21:35:38 +10:00
Angus Salkeld
0e140bbf0f IPC: allow qb to bump the max_message_size
I think this is more user friendly.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-23 20:42:45 +10:00
Angus Salkeld
72033f2b4f IPC: check for a sane minimum max_message_size
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-23 19:57:26 +10:00
Angus Salkeld
316fd95e00 add rpl_sem.h loop_poll_int.h to noinst_headers
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-23 19:10:43 +10:00
Angus Salkeld
239ddc067f Handle errors more consistently
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 21:57:49 +10:00
Angus Salkeld
b650bf29d6 call recv_ready on socket types
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 21:57:49 +10:00
Angus Salkeld
d80f218133 Handle a recv of size 0
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 21:57:49 +10:00
Angus Salkeld
4b7581e514 make bsd shm path better by default.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 20:55:37 +10:00
Angus Salkeld
481b354794 Fix kqueue on freebsd.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 20:55:37 +10:00
Angus Salkeld
ce1da1f28f Get the example socket includes right.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 09:51:28 +10:00
Angus Salkeld
7a09cdae67 Fix kqueue compiling.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 01:37:00 +10:00
Angus Salkeld
26491555ef POLL: seperate out the poll/epoll and add kqueue
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 00:26:20 +10:00
Jan Friesse
d99c585941 Test existence of getpeer* functions
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-03 21:23:18 +10:00
Jan Friesse
c3aeaa22c7 Add inet header to tcpclient example
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-03 21:23:18 +10:00
Jan Friesse
e2fe03e491 Don't link with setpshared if unavailable
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-03 21:23:18 +10:00
Jan Friesse
59784de1e1 NetBSD doesn't have semun defined
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-03 20:49:56 +10:00
Jan Friesse
7b13d09afb Use MADV_NOSYNC only on systems where available
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-28 09:28:42 +11:00
Jan Friesse
77787d49e5 Use SCHED_BATCH only on platforms where available
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-28 09:28:42 +11:00