1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 15:21:51 -08:00
emacs/etc
Paul Eggert 707431575a FILE's lock is now always .#FILE and may be a regular file.
* etc/NEWS: Document this.
* nt/inc/unistd.h (O_NOFOLLOW): New macro.
* src/filelock.c: Include <c-ctype.h>.
(MAX_LFINFO): New top-level constant.
(lock_info_type): Remove members pid, boot_time.  Add members at,
dot, colon.  Change user member to be the entire buffer, not a
pointer.  This allows us to handle the case where a foreign
pid or boot time exceeds the local range.  All uses changed.
(LINKS_MIGHT_NOT_WORK): New constant.
(FREE_LOCK_INFO): Remove, as the pieces no longer need freeing.
(defined_WINDOWSNT): Remove.
(MAKE_LOCK_NAME, file_in_lock_file_name):
Always use .#FILE (not .#-FILE) for the file lock,
even if it is a regular file.
(rename_lock_file): New function.
(create_lock_file): Use it.
(create_lock_file, read_lock_data):
Prefer a symbolic link for the lock file, falling back on a
regular file if symlinks don't work.  Do not try to create
symlinks on MS-Windows, due to security hassles.  Stick with
POSIXish functions (open, read, write, close, fchmod, readlink, symlink,
link, rename, unlink, mkstemp) when creating locks, as a GNUish
host may be using a Windowsish file system, and cannot use
MS-Windows-only system calls.  Fall back on mktemp if mkstemp
doesn't work.  Don't fail merely because of a symlink-contents
length limit in the current file system; fall back on regular
files.  Increase the symlink contents length limit to 8 KiB, this
should be big enough for any real use and doesn't crunch the
stack.
(create_lock_file, lock_file_1, read_lock_data):
Simplify allocation of lock file buffers now that they fit in 8 KiB.
(lock_file_1): Return error number, not bool.  All callers changed.
(ELOOP): New macro, if not already defined.
(read_lock_data): Return size of lock file contents, not Lisp object.
All callers changed.  Handle a race condition if some other process
replaces a regular-file lock with a symlink lock or vice versa,
while we're trying to read the lock.
(current_lock_owner): Parse contents more carefully, to help avoid
confusing a regular-file lock with some other application's use
of the file.  Check for lock file contents being too long, or
not parsing correctly.
(current_lock_owner, lock_file):
Allow foreign pid and boot times that exceed the local range.
(current_lock_owner, lock_if_free, lock_file):
Simplify allocation of lock file contents.
* src/w32.c (sys_rename_replace): New function, containing most of
the contents of the old sys_rename.
(sys_rename): Use it.
(fchmod): New dummy function.
* src/w32.h (sys_rename_replace, fchmod): New decls.

Fixes: debbugs:13807
2013-03-05 14:35:41 -08:00
..
charsets Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
e Spelling fixes. 2011-11-26 20:43:11 -08:00
forms Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
gnus Spelling fixes. 2011-11-19 18:29:42 -08:00
images Prefer UTF-8 when the encoding shouldn't matter and changes are small. 2013-03-05 09:13:01 -08:00
nxml Nuke arch-tags. 2011-01-15 15:16:57 -08:00
org Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
refcards Add and/or fix coding tags for refcard sources. 2013-03-03 18:39:05 -08:00
schema Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
srecode Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
themes Update copyright dates to 2013. 2013-01-02 08:30:50 -08:00
tutorials Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
.gitignore Nuke arch-tags. 2011-01-15 15:16:57 -08:00
AUTHORS Regenerate AUTHORS and ldefs-boot.el 2013-02-07 00:03:47 -08:00
CALC-NEWS Remove info duplicated from manual; convert to outline mode format. 2013-01-31 20:04:23 -08:00
celibacy.1
CENSORSHIP
ChangeLog FILE's lock is now always .#FILE and may be a regular file. 2013-03-05 14:35:41 -08:00
compilation.txt Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
condom.1
CONTRIBUTE A few small TODO and CONTRIBUTE updates 2013-02-16 12:24:50 -08:00
COOKIES
COPYING
copying.paper
DEBUG Improve instructions in etc/DEBUG, per bug #13775. 2013-02-22 11:22:21 +02:00
DEVEL.HUMOR
DISTRIB Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
echo.msg
edt-user.el Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
emacs-buffer.gdb Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
emacs.desktop
emacs.icon
enriched.doc Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
ERC-NEWS Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
ETAGS.EBNF Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
ETAGS.README Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
FTP
future-bug Rename configure.in to configure.ac. 2012-07-08 21:52:49 -07:00
GNU Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
GNUS-NEWS Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
gnus-tut.txt Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
grep.txt Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
HELLO Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
INTERVIEW
JOKES Spelling fixes. 2011-11-14 12:23:26 -08:00
LINUX-GNU
MACHINES Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
MAILINGLISTS Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
MH-E-NEWS Spelling fixes. 2013-03-02 22:40:21 -08:00
MORE.STUFF Remove package not updated in 10 years. 2013-02-20 22:05:10 -08:00
MOTIVATION
NEWS FILE's lock is now always .#FILE and may be a regular file. 2013-03-05 14:35:41 -08:00
NEWS.1-17 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
NEWS.18 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
NEWS.19 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
NEWS.20 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
NEWS.21 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
NEWS.22 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
NEWS.23 Merge calc news from lisp/calc/README into etc/NEWS files 2013-01-31 19:51:08 -08:00
NEXTSTEP Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
NXML-NEWS
ORDERS
ORG-NEWS Fixes related to the last Org merge. 2013-01-08 23:02:09 +01:00
PROBLEMS Simplify data_start configuration. 2013-02-24 21:55:37 -08:00
ps-prin0.ps Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
ps-prin1.ps Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
publicsuffix.txt Spelling fixes. 2012-04-13 22:10:55 -07:00
README Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
rgb.txt
SERVICE Nuke arch-tags. 2011-01-15 15:16:57 -08:00
ses-example.ses Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
sex.6
spook.lines * etc/spook.lines: Additions. (tiny change) 2012-06-01 00:10:49 -07:00
TERMS Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
THE-GNU-PROJECT Spelling fixes. 2011-11-19 23:30:16 -08:00
TODO Merge from emacs-24; up to 2012-12-22T19:09:52Z!rgm@gnu.org 2013-02-24 11:45:17 -08:00
WHY-FREE
yow.lines

This directory contains the architecture-independent files used by or
with Emacs.  This includes some text files of documentation for GNU
Emacs or of interest to Emacs users, and the file of dumped docstrings
for Emacs functions and variables.

`forms-d2.dat' is an example data file used by forms-d2.el.

COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES

File: emacs.icon
  Author: Sun Microsystems, Inc
  Copyright (C) 1999, 2001-2013 Free Software Foundation, Inc.
  License: GNU General Public License version 3 or later (see COPYING)