1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- Hi!
- You can obtain the latest source tree for Gearman by issuing the following command:
- git clone https://github.com/gearman/gearmand
- You will need to have git installed in order for this to work.
- If you are building from source control (i.e. git) you should setup your environment via:
- ./bootstrap.sh autoreconf
- This will build the files you will need in order to run "./configure".
- If you are working on the server here are some handy environmental variables
- you can set so that you can debug make test:
- GEARMAN_VALGRIND <- runs the server under valgrind.
- GEARMAN_MANUAL_GDB <-- runs the server under a remote version of GDB.
- GEARMAN_LOG <-- generates a log file for you with the output of the debug for the server
- GDB will pause the server while you do run the GDB command.
- Coding Style
- ------------
- Variables during assignment should be like:
- a= 12;
- When in doubt, use (). It means I clearly know that you meant for an
- operation to follow a specific order.
- Cast return types void when there is a possibility of failure (don't
- bother with printf, use common sense):
- (void)some_function(...);
- New functions should be named "object_verb_(item_to_act_on)". You
- should email the list if you are extending the API.
- Use spaces after while, for, do, if, else. Don't around anything else.
- If/else bracket style is:
- if ()
- {
- }
- else
- {
- }
- Make sure structs have a typedef with a _st suffix, enums have a _t
- suffix, and functions have a _fn suffix. For example:
- typedef struct gearman_task { ... } gearman_task_st;
- typedef enum gearman_return { ... } gearman_return_t;
- typedef gearman_return_t (gearman_complete_fn)(gearman_task_st *task);
- Cheers,
- -Brian
|