From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails Date: Mon, 29 Jan 2024 19:18:22 +0200 Message-ID: <86wmrs2h41.fsf@gnu.org> References: <86y1c82hfb.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38495"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68799@debbugs.gnu.org To: sbaugh@janestreet.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 29 18:19:06 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rUVHl-0009kI-Sj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Jan 2024 18:19:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUVHb-0005s0-4E; Mon, 29 Jan 2024 12:18:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUVHa-0005rr-AW for bug-gnu-emacs@gnu.org; Mon, 29 Jan 2024 12:18:54 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUVHa-0002Ku-0e for bug-gnu-emacs@gnu.org; Mon, 29 Jan 2024 12:18:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rUVHi-0004lM-55 for bug-gnu-emacs@gnu.org; Mon, 29 Jan 2024 12:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Jan 2024 17:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68799 X-GNU-PR-Package: emacs Original-Received: via spool by 68799-submit@debbugs.gnu.org id=B68799.170654872018282 (code B ref 68799); Mon, 29 Jan 2024 17:19:02 +0000 Original-Received: (at 68799) by debbugs.gnu.org; 29 Jan 2024 17:18:40 +0000 Original-Received: from localhost ([127.0.0.1]:33339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUVHL-0004ko-On for submit@debbugs.gnu.org; Mon, 29 Jan 2024 12:18:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUVHK-0004ka-FC for 68799@debbugs.gnu.org; Mon, 29 Jan 2024 12:18:39 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUVH6-0002HO-J8; Mon, 29 Jan 2024 12:18:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=1cKu53qXw3tk29FjOs5rRyxjZhS/Ly8auKf8U9OGe9k=; b=Ka1WJy8fcFoY NrAJvuaobp59dlWgm+pkwRkkbpJsQyPsQnQGT5xHxckK3Y83Sw6FZ4xzQhT0cOSkYoUSPRrtM5qHr 6pnSGo06TaDg3ZVVszX+MMZXt8ngXBoUopEGft8AswN4Z3CgeT9sE3dLIFH+2XSjB379kGV2ys98l nZvGJ5U5B5uW5VZHb1AJSHz7fL3EXY1fl6/gIp7jcnME1OQFGsOZ0AT60Vf0julTyUIC2PzUORajo Ft7v01U2kcmmEHWpNIdHwL7xsC6QUAXKWCGFTR2octZsa+6661/9WjvK667CAazx8au0dC4vgTPZV kx4XRvE61y5ik+REDp/jrA==; In-Reply-To: <86y1c82hfb.fsf@gnu.org> (message from Eli Zaretskii on Mon, 29 Jan 2024 19:11:36 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279135 Archived-At: > Cc: 68799@debbugs.gnu.org > Date: Mon, 29 Jan 2024 19:11:36 +0200 > From: Eli Zaretskii > > Have some faith in Emacs: we already do that. From startup.el: > > (let ((dn (daemonp))) > (when dn > (when (stringp dn) (setq server-name dn)) > (server-start) > (if server-process > (daemon-initialized) > (if (stringp dn) > (message > "Unable to start daemon: Emacs server named %S already running" > server-name) > (message "Unable to start the daemon.\nAnother instance of Emacs is running the server, either as daemon or interactively.\nYou can use emacsclient to connect to that Emacs process.")) > (kill-emacs 1)))) > > So the problem seems to be that somehow server-start succeeds to leave > a non-nil server-process variable behind, although testing that is the > documented way of telling whether server is running. Or maybe server-start signals an error, and then the code which shows an error message and shuts down Emacs doesn't get run?