Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5731532058bb14dd8b2a63b24a6f18307674335562e3082f40f3489a6b05ea44
Ticket: 0f1ddc0df7fb734cf1cba12ac7c529d29fefb842
exec fails on encoding errors present in the output of the executed command
User & Date: pooryorick on 2024-05-13 09:08:00
Changes

  1. closer changed to: "nobody"
  2. icomment:
    I've reopened this issue and changed the resolution to "wont fix" in order to further discuss this.  "replace" is a minefield, and saving unsuspecting scripts from stepping on a mine when using <code>exec</code> was a big benefit of the decision to use "strict" by default.  glob was only excluded from TIP 657 because no one had the wherewithal to fix it at the time of that TIP. Bad data due to bad encoding is a big problem.  Bad data cause problems down the line after it's too late to do anything about it, especially when they get into persistent storage and are processed much later.  It is quite common for naive scripts to use <code>exec</code> to obtain binary data.  In this case the earlier there is a notable error the better, as it allows the author to correct the script.  This case is much more common than the mixed-encoding problem raised in the current issue.  For programs like the diff program mentioned in this issue that are just doing their job in some encoding-agnostic way, <code>open</code> can always be used instead.  Therefore, there is no real need to strip <code>exec</code> of its strict behaviour.
    
    I propose that <code>exec</code> retain its newfound strict powers, and that Tcl developers focus on adding further knobs to exec if that is deemed worthwhile.
    
  3. login: "pooryorick"
  4. mimetype: "text/x-fossil-wiki"
  5. resolution changed to: "Wont Fix"
  6. status changed to: "Open"