Skip to content

Commit

Permalink
Use fake lock-file (#265)
Browse files Browse the repository at this point in the history
* Use fake lock-file

* Update app_paths.h

---------

Co-authored-by: madelen-at-work <[email protected]>
  • Loading branch information
madelen-at-work and madelen-at-work authored Nov 19, 2024
1 parent 2439fcc commit 7392747
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/app_paths.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
#define APP_DIRECTORY "/usr/local/packages/" APP_NAME
#define APP_LOCALDATA APP_DIRECTORY "/localdata"
#define DAEMON_JSON "daemon.json"
#define TMP_LOCKFILE "/tmp/" APP_NAME "_xtables.lock"
3 changes: 2 additions & 1 deletion app/dockerdwrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,8 @@ static bool set_env_variables(void) {
g_autofree char* xdg_runtime_dir = xdg_runtime_directory();

return set_env_variable("PATH", path) && set_env_variable("HOME", APP_DIRECTORY) &&
set_env_variable("XDG_RUNTIME_DIR", xdg_runtime_dir);
set_env_variable("XDG_RUNTIME_DIR", xdg_runtime_dir) &&
set_env_variable("XTABLES_LOCKFILE", TMP_LOCKFILE);
}

int main(int argc, char** argv) {
Expand Down

0 comments on commit 7392747

Please sign in to comment.