- if (construct->udp)
- sprintf(buffer, "memcached -d -P /tmp/%umemc.pid -U %u", x, x+ TEST_PORT_BASE);
+ if (fp != NULL)
+ {
+ if (fgets(buffer, sizeof(buffer), fp) != NULL)
+ {
+ pid_t pid= (pid_t)atoi(buffer);
+ if (pid != 0)
+ kill(pid, SIGTERM);
+ }
+
+ fclose(fp);
+ }
+ }
+
+ if (x == 0)
+ {
+ sprintf(buffer, "%s -d -P /tmp/%umemc.pid -t 1 -p %u -U %u -m 128",
+ MEMCACHED_BINARY, x, x + TEST_PORT_BASE, x + TEST_PORT_BASE);
+ }