From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jim Meyering Newsgroups: gmane.emacs.bugs Subject: bug#9574: data-loss with --batch: ignored write failure Date: Thu, 22 Sep 2011 16:39:04 +0200 Message-ID: <87mxdwd4l3.fsf@rho.meyering.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1316702402 6153 80.91.229.12 (22 Sep 2011 14:40:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Sep 2011 14:40:02 +0000 (UTC) To: 9574@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 22 16:39:58 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R6kRR-0004aF-NF for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Sep 2011 16:39:57 +0200 Original-Received: from localhost ([::1]:57618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6kRQ-0007Xl-Mr for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Sep 2011 10:39:56 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6kRI-0007XL-EV for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2011 10:39:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6kRE-00043b-62 for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2011 10:39:48 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6kRE-00043X-39 for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2011 10:39:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R6kRX-0002oo-Po for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2011 10:40:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Sep 2011 14:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9574 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.131670239010810 (code B ref -1); Thu, 22 Sep 2011 14:40:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Sep 2011 14:39:50 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6kRJ-0002oJ-J4 for submit@debbugs.gnu.org; Thu, 22 Sep 2011 10:39:50 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6kRE-0002oA-W0 for submit@debbugs.gnu.org; Thu, 22 Sep 2011 10:39:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6kQm-0003yA-HJ for submit@debbugs.gnu.org; Thu, 22 Sep 2011 10:39:24 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:56815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6kQm-0003y6-Fw for submit@debbugs.gnu.org; Thu, 22 Sep 2011 10:39:16 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6kQh-0007Wr-IU for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2011 10:39:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6kQg-0003xU-M5 for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2011 10:39:11 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:59990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6kQg-0003xQ-Ki for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2011 10:39:10 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55934) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1R6kQg-0003NP-DN for bug-emacs@gnu.org; Thu, 22 Sep 2011 10:39:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6kQb-0003ww-P9 for bug-emacs@gnu.org; Thu, 22 Sep 2011 10:39:10 -0400 Original-Received: from mx.meyering.net ([88.168.87.75]:56987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6kQb-0003ws-Ig for bug-emacs@gnu.org; Thu, 22 Sep 2011 10:39:05 -0400 Original-Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 9853960088 for ; Thu, 22 Sep 2011 16:39:04 +0200 (CEST) Original-Lines: 16 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 22 Sep 2011 10:40:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) 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:51667 Archived-At: This should diagnose the write failure and exit nonzero: emacs --version > /dev/full Currently (latest from bzr trunk as of yesterday), emacs exits 0 (successfully) and gives no diagnostic. Obviously that doesn't matter too much, but this next one can easily cause real trouble: $ emacs --batch --eval '(print "important")' > /dev/full && echo FAIL FAIL I.e., the write fails and emacs fails to report that failure. That means anything written via --batch to standard output may be corrupted or incomplete, and emacs will still exit successfully.