From 38aa1c66dae54cf18821be8239f9e717b93ef96d Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 10 Apr 2015 12:14:57 +0000 Subject: [PATCH] prettify procinfo logging git-svn-id: https://xpra.org/svn/Xpra/trunk@8985 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/child_reaper.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xpra/child_reaper.py b/src/xpra/child_reaper.py index fec9dca7ca..dcd2d62ec4 100644 --- a/src/xpra/child_reaper.py +++ b/src/xpra/child_reaper.py @@ -43,6 +43,11 @@ def reaper_cleanup(): singleton.poll() +class ProcInfo(object): + def __repr__(self): + return "ProcInfo(%s)" % self.__dict__ + + # Note that this class has async subtleties -- e.g., it is possible for a # child to exit and us to receive the SIGCHLD before our fork() returns (and # thus before we even know the pid of the child). So be careful: @@ -83,7 +88,7 @@ def check_once(): def add_process(self, process, name, command, ignore=False, forget=False, callback=None): pid = process.pid assert pid>0, "process has no pid!" - procinfo = AdHocStruct() + procinfo = ProcInfo() procinfo.pid = pid procinfo.name = name procinfo.command = command