X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 437B4D1B195 for ; Thu, 15 Jul 2004 19:44:17 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13944-03 for ; Thu, 15 Jul 2004 22:44:08 +0000 (GMT) Received: from cmailg1.svr.pol.co.uk (cmailg1.svr.pol.co.uk [195.92.195.171]) by svr1.postgresql.org (Postfix) with ESMTP id 354E1D1B16A for ; Thu, 15 Jul 2004 19:44:02 -0300 (ADT) Received: from modem-2479.panther.dialup.pol.co.uk ([217.135.249.175] helo=[192.168.0.100]) by cmailg1.svr.pol.co.uk with esmtp (Exim 4.14) id 1BlExP-0006sB-BF; Thu, 15 Jul 2004 23:44:03 +0100 Subject: Re: Point in Time Recovery From: Simon Riggs To: HISADAMasaki Cc: pgsql-hackers@postgresql.org In-Reply-To: <20040715210816.E8A3.HISADA.MASAKI@lab.ntt.co.jp> References: <200407132242.i6DMgg612564@candle.pha.pa.us> <1089760416.17493.3327.camel@stromboli> <20040715210816.E8A3.HISADA.MASAKI@lab.ntt.co.jp> Content-Type: text/plain Organization: 2nd Quadrant Message-Id: <1089931442.17493.6749.camel@stromboli> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Thu, 15 Jul 2004 23:44:02 +0100 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/827 X-Sequence-Number: 56388 On Thu, 2004-07-15 at 13:16, HISADAMasaki wrote: > Dear Simon, > > I've just tested pitr_v5_2.patch and got an error message > during archiving process as follows. > > -- begin > LOG: archive command="cp /usr/local/pgsql/data/pg_xlog/0000000000000000 /tmp",return code=-1 > -- end > > The command called in system(3) works, but it returns -1. > system(3) can not get right exit code from its child process, > when SIGCHLD is set as SIG_IGN. > > So I did following change to pgarch_Main() in pgarch.c > > -- line 236 --- > - pgsignal(SIGCHLD, SIG_IGN); > > -- line 236 --- > + pgsignal(SIGCHLD, SIG_DFL); > Thank you for testing the patch. Very much appreciated. I was aware of the potential issues of incorrect return codes, and that exact part of the code is the part I'm least happy with. I'm not sure I understand why its returned -1, though I'll take you recommendation. I've not witnessed such an issue. What system are you running, or is it a default shell issue? Do people think that the change is appropriate for all systems, or just the one you're using? Best Regards, Simon Riggs