wanted: run-program stream option completeness

Bug #789817 reported by Nikodemus Siivola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Won't Fix
Low
Unassigned

Bug Description

There's no way to say :IF-OUTPUT-DOES-NOT-EXIST :ERROR -- which also somewhat obfuscates that the default is to create the file if it does not exist.

Similarly for error.

:IF-INPUT-DOES-NOT-EXIST :CREATE seems really odd. What's the use-case? I could understand :IF-INPUT-DOES-NOT-EXIST :CREATE-NAMED-PIPE...

Revision history for this message
pipping (pipping) wrote :

Assuming that `open` is used and these options are passed through in the obvious way, I would not expect such a new flag to be necessary. The difference between :if-output-exists :overwrite and :if-output-exists :supersede would be exactly that the former should also have an effect like :if-output-does-not-exist :error, no? That's my understanding of http://clhs.lisp.se/Body/f_open.htm

You get to set

 :if-output-exists :overwrite -> :error if it does not exists
 :if-output-exists :supersede -> :create if it does not exist
 :if-output-exists :append -> :error if it does not exist
 :if-output-exists :error -> :create if it does not exist

I think those four cases cover everything that one would want, no?

Revision history for this message
pipping (pipping) wrote :

I missed an important case that invalidates my argument and suggests that something could indeed be improved here: I think you would typically want to open a log file with

  :direction :output
  :if-exists :append
  :if-does-not-exist :create

Meanwhile, run-program's :if-output-exists :append would give you the effect of :if-does-not-exist :error for the output file, and there's currently no way to change that.

Revision history for this message
Douglas Katzman (dougk) wrote :

11 years since opened, and 6 years of no progress -> won't fix

Changed in sbcl:
status: Triaged → Invalid
status: Invalid → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.