82 lines
No EOL
5.6 KiB
HTML
82 lines
No EOL
5.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>CLiki: Issue CLOSE-FILE-OPENED-WITH-SUPERSEDE</title>
|
|
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
|
|
href="https://www.cliki.net/site/feed/article.atom?title=Issue%20CLOSE-FILE-OPENED-WITH-SUPERSEDE">
|
|
<link rel="stylesheet" href="static/css/style.css">
|
|
<link rel="stylesheet" href="static/css/colorize.css">
|
|
</head>
|
|
|
|
<body>
|
|
<span class="hidden">CLiki - Issue CLOSE-FILE-OPENED-WITH-SUPERSEDE</span>
|
|
<div id="content"><div id="content-area"><div id="article-title">Issue CLOSE-FILE-OPENED-WITH-SUPERSEDE</div><div id="article"><a href="Issue.html" class="category">Issue</a>: CLOSE-FILE-OPENED-WITH-SUPERSEDE<p>Forum: Editorial<p>References: <a href="https://www.cliki.net/site/HyperSpec/Body/fun_close.html" class="hyperspec">CLOSE</a>, <a href="https://www.cliki.net/site/HyperSpec/Body/fun_open.html" class="hyperspec">OPEN</a><p>Category: CLARIFICATION/CHANGE<p>Edit history: 2004-07-20, Version 1 by Bruno Haible<p>Status: For CLiki consideration<p><dl>
|
|
<dt>Problem Description:<p></dt>
|
|
<dd>Clarify the behaviour of <a href="https://www.cliki.net/site/HyperSpec/Body/fun_close.html" class="hyperspec">CLOSE</a> when :abort is T and an old file is being superseded: <a href="https://www.cliki.net/site/HyperSpec/Body/fun_open.html" class="hyperspec">OPEN</a> implies that an implementation is allowed to have already deleted the old file, whereas <a href="https://www.cliki.net/site/HyperSpec/Body/fun_close.html" class="hyperspec">CLOSE</a> does not allow this.<p></dd>
|
|
<dt>Proposal (CLOSE-FILE-OPENED-WITH-SUPERSEDE:ALLOW):<p></dt>
|
|
<dd>In the description of CLOSE, add "if possible" before "the file is deleted and any previously existing file is not superseded."<p></dd>
|
|
<dt>Test case:<p></dt>
|
|
<dd><p></dd>
|
|
<dt>Rationale:<p></dt>
|
|
<dd>The description of the IF-EXISTS modes was written with a more complex filesystem than Unix in mind (1. versions and 2. the distinction between delete and expunge). So any mapping to Unix filesystems must necessarily do some simplifications. It is good that ANSI CL leaves the precise mapping up to the implementation. The description of <a href="https://www.cliki.net/site/HyperSpec/Body/fun_open.html" class="hyperspec">OPEN</a>'s :SUPERSEDE already says "If possible".<p></dd>
|
|
<dt>Current practice:<p></dt>
|
|
<dd>
|
|
<a href="CLISP.html" class="internal">CLISP</a> implements :SUPERSEDE in a way that doesn't make a backup, therefore (close stream :abort t) cannot recover the data. <a href="SBCL.html" class="internal">SBCL</a> works
|
|
similarly.<p></dd>
|
|
<dt>Cost to Implementors:<p></dt>
|
|
<dd>None.<p></dd>
|
|
<dt>Cost to Users:<p></dt>
|
|
<dd>None. Programs who want a backup strategy need to use :IF-EXISTS :RENAME, not :SUPERSEDE anyway.<p></dd>
|
|
<dt>Cost of Non-Adoption:<p></dt>
|
|
<dd>Some implementations might implement a backup strategy for :SUPERSEDE, thus slowing down disk I/O in an unnecessary way.<p></dd>
|
|
<dt>Benefits:<p></dt>
|
|
<dd>Clarity. Avoiding unnecessary inefficiency.<p></dd>
|
|
<dt>Aesthetics:<p><dt>Discussion:
|
|
<ul>
|
|
<li>Bruno Haible supports ALLOW.
|
|
</li>
|
|
<li>Nikodemus Siivola supports ALLOW, and notes that :RENAME-AND-DELETE
|
|
seems to provide for the :ABORT T recovery perfectly. :RENAME is of dubious
|
|
utility, however, as there is not portable way to find out the new name.
|
|
</li>
|
|
</ul><p></dt>
|
|
</dt>
|
|
</dl></div></div>
|
|
<div id="footer" class="buttonbar"><ul><li><a href="Issue CLOSE-FILE-OPENED-WITH-SUPERSEDE.html">Current version</a></li>
|
|
<li><a href="https://www.cliki.net/site/history?article=Issue%20CLOSE-FILE-OPENED-WITH-SUPERSEDE">History</a></li>
|
|
<li><a href="https://www.cliki.net/site/backlinks?article=Issue%20CLOSE-FILE-OPENED-WITH-SUPERSEDE">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=Issue%20CLOSE-FILE-OPENED-WITH-SUPERSEDE&from-revision=3722749393">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
|
|
</div>
|
|
<div id="header-buttons" class="buttonbar">
|
|
<ul>
|
|
<li><a href="https://www.cliki.net/">Home</a></li>
|
|
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
|
|
<li><a href="CLiki.html">About</a></li>
|
|
<li><a href="Text Formatting.html">Text Formatting</a></li>
|
|
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
|
|
</ul>
|
|
<div id="search">
|
|
<form action="https://www.cliki.net/site/search">
|
|
<label for="search_query" class="hidden">Search CLiki</label>
|
|
<input type="text" name="query" id="search_query" value="" />
|
|
<input type="submit" value="search" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div id="pageheader">
|
|
<div id="header">
|
|
<span id="logo">CLiki</span>
|
|
<span id="slogan">the common lisp wiki</span>
|
|
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
|
|
<label for="login_name" class="hidden">Account name</label>
|
|
<input type="text" name="name" id="login_name" class="login_input" />
|
|
<label for= "login_password" class="hidden">Password</label>
|
|
<input type="password" name="password" id="login_password" class="login_input" />
|
|
<input type="submit" name="login" value="login" id="login_submit" /><br />
|
|
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
|
|
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body></html> |