-char *server_startup()
-{
- unsigned int x;
- char server_string_buffer[8096];
- char *end_ptr;
-
- end_ptr= server_string_buffer;
-
- for (x= 0; x < TEST_SERVERS; x++)
- {
- char buffer[1024]; /* Nothing special for number */
- int count;
-
- sprintf(buffer, "memcached -d -P /tmp/%umemc.pid -p %u", x, x+ TEST_PORT_BASE);
- system(buffer);
- count= sprintf(end_ptr, "localhost:%u,", x + TEST_PORT_BASE);
- end_ptr+= count;
- }
- *end_ptr= 0;
-
- return strdup(server_string_buffer);
-}
-
-void server_shutdown(char *server_string)
-{
- unsigned int x;
-
- for (x= 0; x < TEST_SERVERS; x++)
- {
- char buffer[1024]; /* Nothing special for number */
- sprintf(buffer, "cat /tmp/%umemc.pid | xargs kill", x);
- system(buffer);
- }
- if (server_string)
- free(server_string);
-}
-