[Bug 1030474] Re: Executing an invalid command during an ed session causes it to exit with a non 0 error status.

Aaron Howell 1030474 at bugs.launchpad.net
Mon Jul 1 00:10:15 UTC 2024


** Changed in: ed (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ed in Ubuntu.
https://bugs.launchpad.net/bugs/1030474

Title:
  Executing an invalid command during an ed session causes it to exit
  with a non 0 error status.

Status in ed package in Ubuntu:
  Invalid

Bug description:
  If an invalid command is executed while ed is being used
  interactively, the process will exit with a non 0 exit status, even if
  the editing session is successful.

  Steps to reproduce:
  1. Open a text file using ed.
  2. Immediately write the text file back to disk with the w command.
  3. Now press enter until you attempt to display a line beyond the end of the text file (ed will display a ? to show you've entered an invalid command).
  4. Now press q to exit ed.

  Note that even though you successfully saved the file and quit without making any further changes, ed still indicates an error occurred by exiting with status 1.
  This information is not relevant to the calling program when ed is being used as an interactive editor.

  This problem will also occur if you do something as simple as entering
  a letter that has no valid function, or by searching for a string that
  isn't found, or anything else that will cause ed to respond with ?.

  The problem becomes an issue when you are using ed to edit things like
  email messages, or crontabs, where the calling process expects to get
  a 0 return from the editor.

  Ed should only respond with a non 0 exit code when there was an actual
  problem reading or writing the file.

  This problem is not Ubuntu specific it occurs on other flavours of
  Linux using the GNU version of ed.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.10
  Package: ed 1.6-2
  ProcVersionSignature: Ubuntu 3.5.0-6.6-generic 3.5.0
  Uname: Linux 3.5.0-6-generic x86_64
  ApportVersion: 2.4-0ubuntu6
  Architecture: amd64
  Date: Sun Jul 29 19:14:38 2012
  ProcEnviron:
   TERM=screen
   SHELL=/bin/bash
   PATH=(custom, no user)
   LANG=en_AU.UTF-8
  SourcePackage: ed
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ed/+bug/1030474/+subscriptions




More information about the foundations-bugs mailing list