From 00034713a99b1fbc353699fe779360960eeca6a6 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 11 Mar 2009 14:23:15 -0700 Subject: [PATCH] cfg: Initialize lock_fd to -1. Otherwise cfg_unlock() will close stdin on the first call. Since create_lockfile() calls remove_lockfile() as its first action, that's on every useful execution. --- lib/cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cfg.c b/lib/cfg.c index 559b8a69..29bc495b 100644 --- a/lib/cfg.c +++ b/lib/cfg.c @@ -61,7 +61,7 @@ static char *tmp_name; /* Lock information. */ static char *lock_name; -int lock_fd; +int lock_fd = -1; /* Flag to indicate whether local modifications have been made. */ bool dirty; -- 2.30.2