(pidfile)
| 273 | |
| 274 | |
| 275 | def _create_pidlock(pidfile): |
| 276 | pidlock = Pidfile(pidfile) |
| 277 | if pidlock.is_locked() and not pidlock.remove_if_stale(): |
| 278 | print(PIDLOCKED.format(pidfile, pidlock.read_pid()), file=sys.stderr) |
| 279 | raise SystemExit(EX_CANTCREAT) |
| 280 | pidlock.acquire() |
| 281 | return pidlock |
| 282 | |
| 283 | |
| 284 | def fd_by_path(paths): |