From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] waitpid should not crash on error Date: Sun, 16 Oct 2011 11:57:38 +0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=90e6ba1efd82c101d304af627d90 X-Trace: dough.gmane.org 1318737468 12068 80.91.229.12 (16 Oct 2011 03:57:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 16 Oct 2011 03:57:48 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Oct 16 05:57:43 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RFHr5-0000Ni-DH for guile-devel@m.gmane.org; Sun, 16 Oct 2011 05:57:43 +0200 Original-Received: from localhost ([::1]:58733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFHr4-0006Bn-RQ for guile-devel@m.gmane.org; Sat, 15 Oct 2011 23:57:42 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFHr2-0006Bg-NZ for guile-devel@gnu.org; Sat, 15 Oct 2011 23:57:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFHr1-000843-R1 for guile-devel@gnu.org; Sat, 15 Oct 2011 23:57:40 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:45617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFHr1-00083z-Mv for guile-devel@gnu.org; Sat, 15 Oct 2011 23:57:39 -0400 Original-Received: by iagf6 with SMTP id f6so3604127iag.0 for ; Sat, 15 Oct 2011 20:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=pqXRce5Iwan8uxg/+MLAKJRKP2kiP6ZgPlXCBR7CaUo=; b=K0M6nrxlKj3XdjL7yehAebgHh9BD5d6+R/W4a3uJDv7BWfKgKU544g7jwx2npwjW54 x0IghNUeHyeTf7dcP2ZZeVqNPDQ2/r43I3i16zcfqImILPboLVZ9UteVJKVXRNcB/u1y tQu1DMEer4TvMVtTZKdr4no7q6JEH9NsB8xxU= Original-Received: by 10.42.151.4 with SMTP id c4mr20917510icw.39.1318737458299; Sat, 15 Oct 2011 20:57:38 -0700 (PDT) Original-Received: by 10.43.132.133 with HTTP; Sat, 15 Oct 2011 20:57:38 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12840 Archived-At: --90e6ba1efd82c101d304af627d90 Content-Type: multipart/alternative; boundary=90e6ba1efd82c101d004af627d8e --90e6ba1efd82c101d004af627d8e Content-Type: text/plain; charset=UTF-8 hi guys! I realized that "waitpid" in Guile will cause my program crash while "waitpid" actually returned -1. I believe it's unnecessary. I think the better way is we deal with it by ourselves if "waitpid in POSIX" returned -1. The SCM_SYSERROR bother me a lot. I hope my program get robustness other than crash. Yes I can wrap my own "waipid" for my program if no one get interested in this patch. Just a suggestion. ;-) What you guys think? --90e6ba1efd82c101d004af627d8e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable hi guys!
I realized that "waitpid" in Guile will cause my pro= gram crash while "waitpid"=C2=A0actually=C2=A0returned -1. I beli= eve it's=C2=A0unnecessary. I think the better way is we deal with it by= ourselves if "waitpid in POSIX" returned -1. The SCM_SYSERROR bo= ther me a lot. I hope my program get=C2=A0robustness other than crash.=C2= =A0

Yes I can wrap my own "waipid" for my program= if no one get interested in this patch. Just a suggestion. ;-)
W= hat you guys think?
--90e6ba1efd82c101d004af627d8e-- --90e6ba1efd82c101d304af627d90 Content-Type: text/x-patch; charset=US-ASCII; name="0001-waitpid-should-return-false-on-error.patch" Content-Disposition: attachment; filename="0001-waitpid-should-return-false-on-error.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gtti75gu0 RnJvbSAwZTRiNjVlZTZiOGRmYzZjZmJhMDFhOWE5MWFhNDliYWJhYTVkN2M3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBOYWxhR2lucnV0IDxOYWxhR2lucnV0QGdtYWlsLmNvbT4KRGF0 ZTogU3VuLCAxNiBPY3QgMjAxMSAxMTozMDoyNSArMDgwMApTdWJqZWN0OiBbUEFUQ0hdIHdhaXRw aWQgc2hvdWxkIHJldHVybiBmYWxzZSBvbiBlcnJvcgoKLS0tCiBsaWJndWlsZS9wb3NpeC5jIHwg ICAgMiArLQogMSBmaWxlcyBjaGFuZ2VkLCAxIGluc2VydGlvbnMoKyksIDEgZGVsZXRpb25zKC0p CgpkaWZmIC0tZ2l0IGEvbGliZ3VpbGUvcG9zaXguYyBiL2xpYmd1aWxlL3Bvc2l4LmMKaW5kZXgg MjkyM2RjNi4uNWI4Zjg0OSAxMDA2NDQKLS0tIGEvbGliZ3VpbGUvcG9zaXguYworKysgYi9saWJn dWlsZS9wb3NpeC5jCkBAIC03MzEsNyArNzMxLDcgQEAgU0NNX0RFRklORSAoc2NtX3dhaXRwaWQs ICJ3YWl0cGlkIiwgMSwgMSwgMCwKICAgICB9CiAgIFNDTV9TWVNDQUxMIChpID0gd2FpdHBpZCAo c2NtX3RvX2ludCAocGlkKSwgJnN0YXR1cywgaW9wdGlvbnMpKTsKICAgaWYgKGkgPT0gLTEpCi0g ICAgU0NNX1NZU0VSUk9SOworICAgICAgcmV0dXJuIFNDTV9CT09MX0Y7CiAgIHJldHVybiBzY21f Y29ucyAoc2NtX2Zyb21faW50IChpKSwgc2NtX2Zyb21faW50IChzdGF0dXMpKTsKIH0KICN1bmRl ZiBGVU5DX05BTUUKLS0gCjEuNy4wLjQKCg== --90e6ba1efd82c101d304af627d90--