+ for (uint32_t x= 0; x < construct->count; x++)
+ {
+ uint32_t counter= 3;
+ char buffer[1024]; /* Nothing special for number */
+
+ snprintf(buffer, sizeof(buffer), "/tmp/%umemc.pid", x);
+
+ while (--counter)
+ {
+ int memcached_pid;
+
+ FILE *file;
+ file= fopen(buffer, "r");
+ if (file == NULL)
+ {
+#ifndef WIN32
+ struct timespec req= { .tv_sec= 0, .tv_nsec= 5000 };
+ nanosleep(&req, NULL);
+#endif
+ continue;
+ }
+ char *found= fgets(buffer, sizeof(buffer), file);
+ if (!found)
+ {
+ abort();
+ }
+ // Yes, we currently pitch this and don't make use of it.
+ memcached_pid= atoi(buffer);
+ fclose(file);
+ }
+
+
+ }
+