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.devel Subject: Re: Sending EOF to process as part of comint-simple-send Date: Sun, 15 Jan 2023 12:25:49 +0200 Message-ID: <83mt6k5c2a.fsf@gnu.org> References: <83v8l971id.fsf@gnu.org> <1c1a3086-1c0a-e4c0-0bd6-6c48cd0efaa3@gmail.com> <831qnw6z7u.fsf@gnu.org> <874jss9onq.fsf@linux-m68k.org> <83tu0s5fmy.fsf@gnu.org> <87zgak8602.fsf@linux-m68k.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37854"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jporterbugs@gmail.com, emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 15 11:26:11 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pH0DL-0009es-KH for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Jan 2023 11:26:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pH0D0-0001dm-BQ; Sun, 15 Jan 2023 05:25:50 -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 1pH0Cv-0001dM-4a for emacs-devel@gnu.org; Sun, 15 Jan 2023 05:25:46 -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 1pH0Cu-0006IY-Jf; Sun, 15 Jan 2023 05:25:44 -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=pTqi6ZtJF1c5iSbPKuyWFFns8GNX67qH6yH5gSwS/L4=; b=Oi842U1z5o7v LNcMESAPtKWHQ5gIUq3jYb00JuVAO6ebi2N7u7L6Avpj5NGnlrUsWvDXYTWrYjc9OfSo7d74pOCFp naWJAxgPn4ScBIoaNe09LxO4JiD84E4IAlPcndEihd/joV9NP6z5jeqHa4vk+7acoFrHFMBHXylVV pkQ/rGcPQRYtoZNU8Zf3tHrbPWu//u88kGGPgi1OaMZUe/Jv/0qgVSyViSAHQM7xCpL71EKL4cvq0 OfCKYb6F0ZC/DEb/i6w4dshaW2EJ6gWoxzyhjFh1UExULJNkDld4Kt4XoN+RliOQ4hJAAIQl6bQzF c+oX9rPCP6hX9Ko8DF3IEQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pH0Cu-00059l-12; Sun, 15 Jan 2023 05:25:44 -0500 In-Reply-To: <87zgak8602.fsf@linux-m68k.org> (message from Andreas Schwab on Sun, 15 Jan 2023 11:08:29 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302433 Archived-At: > From: Andreas Schwab > Cc: jporterbugs@gmail.com, emacs-devel@gnu.org > Date: Sun, 15 Jan 2023 11:08:29 +0100 > > On Jan 15 2023, Eli Zaretskii wrote: > > >> From: Andreas Schwab > >> Cc: Jim Porter , emacs-devel@gnu.org > >> Date: Sun, 15 Jan 2023 09:40:09 +0100 > >> > >> On Jan 15 2023, Eli Zaretskii wrote: > >> > >> > Right. This doesn't work for pipes, so I intend to introduce a new > >> > function that does fsync on the descriptor via which we write to the > >> > sub-process, and call it there instead of process-send-eof. Does this > >> > make sense? > >> > >> You will probably get EINVAL. > > > > And the stuff will not be flushed? > > There is nothing to flush. This is not useful. I'm considering the following scenario: emacs -Q M-: (setq process-connection-type nil) RET M-x shell RET od -t x1 RET 1000 C-c C-d Instead of "C-c C-d" (which in the above scenario closes the connection to the sub-process) I'm thinking of adding a command to make sure the "1000" part is sent to 'od' without a newline. Are you saying that this will happen automatically on Posix systems? Or are you saying that there's no way to do that when communicating with sub-processes via pipes? Or are you saying something else?