From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Laws Newsgroups: gmane.emacs.bugs Subject: bug#19688: [patch] add support for emacs daemon on Windows Date: Sun, 15 Feb 2015 06:15:24 +0900 Message-ID: References: <83h9ver459.fsf@gnu.org> <83d262qdx6.fsf@gnu.org> <54C62B6C.3050608@dancol.org> <834mr8n5or.fsf@gnu.org> <83pp9e42n8.fsf@gnu.org> <8361b4y9qj.fsf@gnu.org> <83wq3kwrjx.fsf@gnu.org> <83r3tswm6d.fsf@gnu.org> <83iof4wi2c.fsf@gnu.org> <83egpswgnm.fsf@gnu.org> <83bnkwwfsz.fsf@gnu.org> <838ug0wdqs.fsf@gnu.org> <83zj8guw9x.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1423948587 14956 80.91.229.3 (14 Feb 2015 21:16:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Feb 2015 21:16:27 +0000 (UTC) Cc: 19688@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 14 22:16:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YMk4W-0000oE-1X for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Feb 2015 22:16:16 +0100 Original-Received: from localhost ([::1]:32917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMk4V-00031H-2d for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Feb 2015 16:16:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMk4N-000308-Lx for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 16:16:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMk4I-0004uT-Lk for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 16:16:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMk4I-0004uN-Iu for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 16:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YMk4I-0001Ly-51 for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 16:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mark Laws Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Feb 2015 21:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19688 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19688-submit@debbugs.gnu.org id=B19688.14239485335159 (code B ref 19688); Sat, 14 Feb 2015 21:16:02 +0000 Original-Received: (at 19688) by debbugs.gnu.org; 14 Feb 2015 21:15:33 +0000 Original-Received: from localhost ([127.0.0.1]:44213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMk3o-0001L8-Gc for submit@debbugs.gnu.org; Sat, 14 Feb 2015 16:15:32 -0500 Original-Received: from mail-ig0-f171.google.com ([209.85.213.171]:44776) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMk3m-0001Ku-O3 for 19688@debbugs.gnu.org; Sat, 14 Feb 2015 16:15:31 -0500 Original-Received: by mail-ig0-f171.google.com with SMTP id h15so17033612igd.4 for <19688@debbugs.gnu.org>; Sat, 14 Feb 2015 13:15:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=DsdQHNcA72pq8juazrrWWCrH6bpcRogfmGkV3f1Dq94=; b=B+/TSVZsYgnMtPh0XHDCzK+fzjohFuCN+0vW7cmMMXGz4XaBtElHd3t5rcdVeyupVc Zc22vUzqoWF9eHKwT5Gptf96TN2t77CFkePtoui4M7NLxNlJPvpGuflWVb3sAhohWs60 wgy2QIj5ny/D/y4aaMh3K+yyofeajGrGD8GEtkt83Dxcuet2eUUOkUzYnFqB8OZO9qSW F0RdS5eUVkpe5p7EtK7Cw6kmhYi/9hxIJ8szQqjS7+PSsj9cEUGbftv8DsspEoBRx57v ltnMjxhuRGG0ewTSE3RKjnNMs5hoRfsmhUDMIt7IMeySWU1FD3fGOGZaUqfCGgZ1b24j k+kw== X-Gm-Message-State: ALoCoQk2LpGIE68RgQ3WtyHcBdcMgFfj2gpFwvdM5BdP1HkS7242QI4QVmhzeN6b6KSQWG9kBkih X-Received: by 10.107.170.8 with SMTP id t8mr6148408ioe.7.1423948524958; Sat, 14 Feb 2015 13:15:24 -0800 (PST) Original-Received: by 10.36.65.195 with HTTP; Sat, 14 Feb 2015 13:15:24 -0800 (PST) X-Originating-IP: [219.102.234.58] In-Reply-To: <83zj8guw9x.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99417 Archived-At: On Sun, Feb 15, 2015 at 4:29 AM, Eli Zaretskii wrote: > It's up to you. It's no big deal either way. Well, we'd need to also split the Windows part of daemon_check_preconditions into a one-line function just to avoid having INVALID_HANDLE_VALUE in emacs.c: #ifdef WINDOWSNT /* IS_DAEMON above already checks that w32_daemon_event != NULL, so only check that we successfully started the daemon here. */ if (w32_daemon_event == INVALID_HANDLE_VALUE) #else if (daemon_pipe[1] < 0 ) #endif ...and we'd have to move the code earlier in the file that calls CreateEvent. Also, since w32.c seems to mostly be a place for utility functions (it does not contain state variables), and the Unix daemon_pipe stuff is in emacs.c, it would be weird to put the Windows daemon variable in a completely different place. Basically, it doesn't really seem worth complicating the general flow of emacs.c for the sake of moving a few Windows-isms when w32.h is already included anyway--not to mention, there's already other OS-specific code throughout the file. Sorry if I've misinterpreted you, i.e. if what you meant was "please just move the Windows junk to w32.c", in which case I'll get on it later today. But otherwise, I think the current patch makes the code easier to follow. -- |v\ /\ |\ |< |_ /\ \^| //