General: Don't hardcode devnull dir

This commit is contained in:
Dylan Araps 2017-06-22 12:10:07 +10:00
parent b2e709355b
commit f59eb5cbdd

6
wal
View File

@ -83,7 +83,7 @@ def process_args(args):
# -q # -q
if args.q: if args.q:
sys.stdout = sys.stderr = open("/dev/null", "w") sys.stdout = sys.stderr = open(os.devnull, "w")
# -c # -c
if args.c: if args.c:
@ -114,8 +114,8 @@ def process_args(args):
# -o # -o
if args.o: if args.o:
subprocess.Popen(["nohup", args.o], subprocess.Popen(["nohup", args.o],
stdout=open("/dev/null", "w"), stdout=subprocess.DEVNULL,
stderr=open("/dev/null", "w"), stderr=subprocess.DEVNULL,
preexec_fn=os.setpgrp) preexec_fn=os.setpgrp)