Pidlock.claim: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/daemon/pidlock.bend as Pidlock Lines 51-54 of cswap-bend-cli@0.1.0.0/daemon/pidlock.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/daemon/pidlock.bend&start_line=51&end_line=54 import Base import cswap-bend-cli@0.1.0.0/fs/write.bend as FsW import cswap-bend-cli@0.1.0.0/act.bend as Act def claim(+state_dir: String) -> Act.of(Unit): do ActM: pid : U32 <- Act.lift(U32, my_pid()) FsW.write_atomic(pid_path(state_dir), U32.show(pid) ++ "\n", "600") Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=lift https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=of https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/pidlock.bend&name=ActM https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/pidlock.bend&name=ActM.bind https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/pidlock.bend&name=my_pid https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/pidlock.bend&name=pid_path https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs/write.bend&name=write_atomic