Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'debugging': 0.07; 'suddenly': 0.07; 'exec': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:process': 0.09; 'url:activestate': 0.09; 'developer': 0.10; 'django': 0.11; 'dumps': 0.16; 'fork': 0.16; 'process?': 0.16; 'purposes?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:core': 0.16; 'passing': 0.19; 'command': 0.22; 'appears': 0.22; 'header:User- Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'url:code': 0.29; "i'm": 0.30; 'flags': 0.31; 'linux.': 0.31; 'view.': 0.31; 'file': 0.32; 'supposed': 0.32; 'run': 0.32; 'mac': 0.33; 'core': 0.34; 'subject:from': 0.34; 'except': 0.35; 'etc': 0.35; 'possible': 0.36; 'starting': 0.37; 'server': 0.38; 'ends': 0.38; 'to:addr:python-list': 0.38; 'little': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'information': 0.63; 'management': 0.65; 'finally': 0.65; 'believe': 0.68; 'received:109': 0.72; 'interrupt': 0.84; 'capture': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Robin Becker Subject: mac os core dump from detached process Date: Mon, 27 Apr 2015 10:21:18 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 109.174.168.73 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1430126505 news.xs4all.nl 2933 [2001:888:2000:d::a6]:39823 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3542 X-Received-Body-CRC: 19783143 Xref: csiph.com comp.lang.python:89454 I'm using the double fork exec model as exemplified in http://code.activestate.com/recipes/278731-creating-a-daemon-the-python-way/ to run a django management command detached from any view. A database object is used to store/update information about the process. The command does have a log file and appears to work well on linux. However, on my developer colleague's mac using the django development server the job ends suddenly without passing through the try except finally that's supposed to capture information. I believe the only way it can do this is os._exit or an interrupt eg SIGSEGV etc etc. Is it possible to get core dumps on the Mac for debugging purposes? Would the detached process inherit flags etc etc from the starting process? I know little about OS X/Mach. -- Robin Becker