X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 721A03858C2F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=Askesis.nl Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Askesis.nl Message-ID: <426b02170703066d930c6f3a81f3ef9e686f69b6.camel@Askesis.nl> Subject: Re: Unexpected zero return code from `throw std::runtime_error` From: Joost Kraaijeveld To: cygwin AT cygwin DOT com Date: Sat, 02 Jul 2022 16:14:51 +0200 In-Reply-To: <20220702132158.g6u7wo2lnokgezoc@lucy.dinwoodie.org> References: <20220702132158 DOT g6u7wo2lnokgezoc AT lucy DOT dinwoodie DOT org> User-Agent: Evolution 3.44.2-1 MIME-Version: 1.0 X-Authenticated-Id: j DOT kraaijeveld AT askesis DOT nl X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Hi, The exception is not handled by the program. In that case "[[noreturn]] void std::terminate()" is called by the C++-runtime. std::terminate calls the currently installed std::terminate_handler. The default std::terminate_handler calls std::abort. After calling std::abort an implementation defined status is returned to the host environment that indicates unsuccessful execution. So basically both programs do the right thing. -- Groeten, Joost Kraaijeveld -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple