Changeset f0ac0921 in trunk


Ignore:
Timestamp:
2021-02-12T19:49:20Z (5 years ago)
Author:
Jean-Paul Calderone <exarkun@…>
Branches:
master
Children:
66d40527
Parents:
e9adccd
Message:

Avoid the pidfile stuff on Windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/allmydata/scripts/tahoe_run.py

    re9adccd rf0ac0921  
    204204        return 1
    205205
    206     pidfile = get_pidfile(basedir)
    207     twistd_args = ["--nodaemon", "--rundir", basedir, "--pidfile", pidfile]
     206    twistd_args = ["--nodaemon", "--rundir", basedir]
     207    if sys.platform != "win32":
     208        pidfile = get_pidfile(basedir)
     209        twistd_args.extend(["--pidfile", pidfile])
    208210    twistd_args.extend(config.twistd_args)
    209211    twistd_args.append("DaemonizeTahoeNode") # point at our DaemonizeTahoeNodePlugin
     
    222224
    223225    # handle invalid PID file (twistd might not start otherwise)
    224     if get_pid_from_pidfile(pidfile) == -1:
     226    if sys.platform != "win32" and get_pid_from_pidfile(pidfile) == -1:
    225227        print("found invalid PID file in %s - deleting it" % basedir, file=err)
    226228        os.remove(pidfile)
Note: See TracChangeset for help on using the changeset viewer.