summaryrefslogtreecommitdiff
path: root/src/readahead-replay.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/readahead-replay.c')
-rw-r--r--src/readahead-replay.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/readahead-replay.c b/src/readahead-replay.c
index f0710e5ddf..e22fc04392 100644
--- a/src/readahead-replay.c
+++ b/src/readahead-replay.c
@@ -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;