chiark / gitweb /
readahead: ignore replay events when collecting
[elogind.git] / src / readahead-replay.c
index f0710e5ddf7ef1cb7d1cac95b5dcef88179c4940..e22fc04392a8ad7d3d9e8d057b04d3d415bcc050 100644 (file)
@@ -44,6 +44,8 @@
 
 static off_t arg_file_size_max = READAHEAD_FILE_SIZE_MAX;
 
+static ReadaheadShared *shared = NULL;
+
 static int unpack_file(FILE *pack) {
         char fn[PATH_MAX];
         int r = 0, fd = -1;
@@ -338,6 +340,12 @@ int main(int argc, char*argv[]) {
                 return 0;
         }
 
+        if (!(shared = shared_get()))
+                return 1;
+
+        shared->replay = getpid();
+        __sync_synchronize();
+
         if (replay(optind < argc ? argv[optind] : "/") < 0)
                 return 1;