From owner-freebsd-hackers@freebsd.org Thu Apr 27 12:48:47 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12C86D51D99 for ; Thu, 27 Apr 2017 12:48:47 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ua0-x22d.google.com (mail-ua0-x22d.google.com [IPv6:2607:f8b0:400c:c08::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFD721F2 for ; Thu, 27 Apr 2017 12:48:46 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-ua0-x22d.google.com with SMTP id f10so18580057uaa.2 for ; Thu, 27 Apr 2017 05:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=t+G3RiRMY2/MVKhBAz18iQiE2HTnyKy3bqi9wBZkpv4=; b=FxD50jMw70tfw9TkJ7tzguTNkido9KpawCjrDSRdXkdtOomlh60HO+X4jAhA8ZE/Ai Dc6tH/9hXvRScWUWra01ShduVXZQlzHVwPyVgneBoluNUOVa94HL6PB44tH+oxhBE7ZL 271DwwKw7lf/EKMTgqeA2EBhS/thsmDp3okTOPmXHH97HzCkrbXXN7ifuN6Alz4HWx4H u3jm9ENudYHDZl3PvDzVSYu/v3ry42k+/+lWQa0NJaiMAnyXTStYAcC9SejkSXOfd0xX dfl3VBVtXyeXofVDwDrMm37emiDSyT6J99l9fLjVBW05G0+y+jGy9dwSkoJ/BToOZaRb zd4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=t+G3RiRMY2/MVKhBAz18iQiE2HTnyKy3bqi9wBZkpv4=; b=WATQflE/9xcfbILBbPvqFc0fzn7+4hdsTTBwaoumzLVcPNtJMXfyn6nqGafz13k2eQ 4jTCKpMSKyvgSDC5LML9ydc3FctxVRU+cUVuBiotqT8dfpN5M52k0eAy8UytKBKtU2Cg YscQm6Jeb1QFkSUtjMfSzt5W1jhzxNZdatGONwYqwYRaQSgNNux4CzdbueC676wJWk9/ P9qW8X5alJxDFoRE+zZw9xHDiO1fNvX1YYeX7gdWw8mB2I2QNVZS+1DsAnRmq+NkDWcw UbESir/54EUNoMnosfPyP/eRVynW6ea0nVcC9Uh/unbN1eoyXR1+vZMi6WrXK+C/6hS3 oE6g== X-Gm-Message-State: AN3rC/4t1nENb+oeV11FS2/2Wz1Mucitbxslt0a5peVAeysL10YV08UE 2X/QSmukWjJTo1eH8+hoIcOrsbhnCQ== X-Received: by 10.176.82.136 with SMTP id v8mr2397387uav.123.1493297325842; Thu, 27 Apr 2017 05:48:45 -0700 (PDT) MIME-Version: 1.0 Sender: etnapierala@gmail.com Received: by 10.176.22.222 with HTTP; Thu, 27 Apr 2017 05:48:45 -0700 (PDT) In-Reply-To: <32ac85ed-f0e5-2f80-299a-3bb1166cd5e6@digiware.nl> References: <32ac85ed-f0e5-2f80-299a-3bb1166cd5e6@digiware.nl> From: Edward Napierala Date: Thu, 27 Apr 2017 13:48:45 +0100 X-Google-Sender-Auth: PtSLzMjmGRGwtovKe5Ct4iguVXw Message-ID: Subject: Re: Disabling program core dumps To: Willem Jan Withagen Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2017 12:48:47 -0000 There's the kern.coredump sysctl, which makes it possible to disable coredumping globally. 2017-04-27 13:36 GMT+01:00 Willem Jan Withagen : > Hi, > > Running (googletest) tests some are expected to die: EXPECT_DEATH(). > This normally dumps a core, but since it is expected that core is rather > useless. > > Thusfar I've found the best way to limit a program to dump core (from > within the program) is to set its RLIMIT_CORE to 0. > > So I can do this before the test, and then set the old size back once > the test is finished. > > Or is there another way, like setting a flag in process state (which I > have not been able to find) > > --WjW > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >