From aa9db80e1020fc9cbad0325705014767e8af984a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 31 May 2014 12:52:50 -0400 Subject: [PATCH] Better behavior in case stdout was closed when irkerd was backgrounded. --- irkerd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/irkerd b/irkerd index 2c66a18..dd567e5 100755 --- a/irkerd +++ b/irkerd @@ -937,7 +937,10 @@ class IrkerUDPHandler(socketserver.BaseRequestHandler): def in_background(): "Is this process running in background?" - return os.getpgrp() != os.tcgetpgrp(1) + try: + return os.getpgrp() != os.tcgetpgrp(1) + except OSError: + return True if __name__ == '__main__': parser = argparse.ArgumentParser( -- 2.26.2