MyNixOS website logo
Description

LD_PRELOAD shim to add file locking to programs that don't do it (I'm looking at you, rsync!)

This library and tool exists solely because rsync doesn't have file locking.

It's not used like a normal library; you don't link against it, and you don't have to patch your source code to use it. It's inserted between your program and its libraries by use of LD_PRELOAD.

For example:

$ env LD_PRELOAD=$(nix-build -A pkgs.flockit)/lib/libflockit.so FLOCKIT_FILE_PREFIX=test rsync SRC DEST

Besides the library a handy executable is provided which can simplify the above to:

$ $(nix-build -A pkgs.flockit)/bin/flockit test rsync SRC DEST

Also see the following blog post: https://www.swiftstack.com/blog/2012/08/15/old-school-monkeypatching/

Metadata

Version

2012-08-11

License

Maintainers (1)

Executables (1)

  • bin/flockit

Platforms (21)

    Linux
Show all
  • aarch64-linux
  • armv5tel-linux
  • armv6l-linux
  • armv7a-linux
  • armv7l-linux
  • i686-linux
  • loongarch64-linux
  • m68k-linux
  • microblaze-linux
  • microblazeel-linux
  • mips-linux
  • mips64-linux
  • mips64el-linux
  • mipsel-linux
  • powerpc64-linux
  • powerpc64le-linux
  • riscv32-linux
  • riscv64-linux
  • s390-linux
  • s390x-linux
  • x86_64-linux