3
If you are working on the server here are some handy environmental variables
4
you can set so that you can debug make test:
6
GEARMAN_VALGRIND <- runs the server under valgrind.
7
GEARMAN_MANUAL_GDB <-- runs the server under a remote version of GDB.
8
GEARMAN_LOG <-- generates a log file for you with the output of the debug for the server
10
GDB will pause the server while you do run the GDB command.
15
Variables during assignment should be like:
18
When in doubt, use (). It means I clearly know that you meant for an
19
operation to follow a specific order.
21
Cast return types void when there is a possibility of failure (don't
22
bother with printf, use common sense):
24
(void)some_function(...);
26
New functions should be named "object_verb_(item_to_act_on)". You
27
should email the list if you are extending the API.
29
Use spaces after while, for, do, if, else. Don't around anything else.
31
If/else bracket style is:
39
Make sure structs have a typedef with a _st suffix, enums have a _t
40
suffix, and functions have a _fn suffix. For example:
42
typedef struct gearman_task { ... } gearman_task_st;
43
typedef enum gearman_return { ... } gearman_return_t;
44
typedef gearman_return_t (gearman_complete_fn)(gearman_task_st *task);