From 476a554835f8a9f9bda684e0358a09bb0fc81580 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 8 Jan 2011 23:45:14 +0000 Subject: [PATCH] realtime: if persist_fn is empty, do not attempt persist conversion etc. (useful for valgrind, which does strange things to /proc/self/exe) --- hostside/.gitignore | 1 + hostside/persist.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hostside/.gitignore b/hostside/.gitignore index 06256ff..f796ab5 100644 --- a/hostside/.gitignore +++ b/hostside/.gitignore @@ -19,6 +19,7 @@ retransmit-table.h record-l.[ch] record-y.[ch] +persist* +.lock +*.log +realtime.stderr *+dflags.h diff --git a/hostside/persist.c b/hostside/persist.c index 85215e2..6f9beee 100644 --- a/hostside/persist.c +++ b/hostside/persist.c @@ -140,6 +140,7 @@ static int try(const char *data, const char *conv) { void persist_entrails_interpret(void) { /* creates persist_record_converted */ + if (!persist_fn[0]) return; assert(!persist_record_converted); persist_record_converted= mstrdup(FN1(record)); @@ -220,6 +221,7 @@ void persist_install(void) { int c, dst_fd; if (fd==-1) return; + if (!persist_fn[0]) return; src= fopen("/proc/self/exe","rb"); if (!src) diee("open /proc/self/exe"); -- 2.30.2