1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-17 10:06:13 +00:00
emacs/admin
Paul Eggert 067428c171 Make file descriptors close-on-exec when possible.
This simplifies Emacs a bit, since it no longer needs to worry
about closing file descriptors by hand in some cases.
It also fixes some unlikely races.  Not all such races, as
libraries often open files internally without setting
close-on-exec, but it's an improvement.
* admin/merge-gnulib (GNULIB_MODULES): Add fcntl, pipe2.
(GNULIB_TOOL_FLAGS): Avoid binary-io, close.  Do not avoid fcntl.
* configure.ac (mkostemp): New function to check for.
(PTY_OPEN): Pass O_CLOEXEC to posix_openpt.
* lib/fcntl.c, lib/getdtablesize.c, lib/pipe2.c, m4/fcntl.m4:
* m4/getdtablesize.m4, m4/pipe2.m4: New files, taken from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* nt/gnulib.mk: Remove empty gl_GNULIB_ENABLED_verify section;
otherwise, gnulib-tool complains given close-on-exec changes.
* nt/inc/ms-w32.h (pipe): Remove.
* nt/mingw-cfg.site (ac_cv_func_fcntl, gl_cv_func_fcntl_f_dupfd_cloexec)
(gl_cv_func_fcntl_f_dupfd_works, ac_cv_func_pipe2): New vars.
* src/alloc.c (valid_pointer_p) [!WINDOWSNT]:
* src/callproc.c (Fcall_process) [!MSDOS]:
* src/emacs.c (main) [!DOS_NT]:
* src/nsterm.m (ns_term_init):
* src/process.c (create_process):
Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
* src/emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
* src/filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
Prefer mkostemp with O_CLOEXEC to mkstemp.
* src/callproc.c (relocate_fd) [!WINDOWSNT]:
* src/emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
now using pipe2.
* src/filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
Make the resulting file descriptor close-on-exec.
* src/lisp.h, src/lread.c, src/process.c (close_load_descs, close_process_descs):
* src/lread.c (load_descriptor_list, load_descriptor_unwind):
Remove; no longer needed.  All uses removed.
* src/process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
(close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
New functions.
(socket) [!SOCK_CLOEXEC]: Supply a substitute.
(Fmake_network_process, Fnetwork_interface_list):
(Fnetwork_interface_info, server_accept_connection):
Make newly-created socket close-on-exec.
* src/sysdep.c (emacs_open, emacs_fopen):
Make new-created descriptor close-on-exec.
* src/w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
* src/w32.c, src/w32.h (pipe2): Rename from 'pipe', with new flags arg.

Fixes: debbugs:14803
2013-07-07 11:00:14 -07:00
..
charsets Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
coccinelle * src/lisp.h (XSAVE_POINTER, XSAVE_INTEGER): Change to allow extraction 2013-01-15 13:22:25 +04:00
grammars Merge from CEDET upstream (8564). 2013-06-02 15:33:09 +02:00
notes Shameful typo 2013-06-24 19:31:09 -07:00
nt * admin/nt/README-ftp-server: Update from http://ftp.gnu.org/gnu/emacs/windows/ 2013-06-18 23:31:20 -07:00
unidata Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
admin.el * admin.el (make-manuals): Add the option to only make certain output types. 2013-07-06 11:28:54 -07:00
alloc-colors.c Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
build-configs Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
bzrmerge.el Merge from emacs-24 2013-03-16 18:08:22 -04:00
ChangeLog Make file descriptors close-on-exec when possible. 2013-07-07 11:00:14 -07:00
check-doc-strings * check-doc-strings: Update for CVS->bzr, moved lispref/ directory. 2013-01-02 18:36:29 -08:00
CPP-DEFINES Remove some unused macros from 'configure'. 2013-07-02 09:56:29 -07:00
cus-test.el Add some cus-test.el stuff for custom groups 2013-05-15 20:20:34 -04:00
diff-tar-files Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
FOR-RELEASE * admin/FOR-RELEASE: Add note about linc.py. 2013-07-03 19:30:36 -07:00
MAINTAINERS Remove some of the more obsolete MAINTAINERS info 2013-01-08 20:00:57 -08:00
make-emacs Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
make-tarball.txt Fix typo in previous 2013-03-09 18:15:08 -08:00
merge-gnulib Make file descriptors close-on-exec when possible. 2013-07-07 11:00:14 -07:00
quick-install-emacs Use just DOC instead of DOC-nn.mm. 2013-05-15 16:12:53 -04:00
README Remove some deleted files 2013-01-02 18:31:36 -08:00

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Copyright (C) 2001-2013 Free Software Foundation, Inc.
See the end of the file for license conditions.


			 The admin directory

This directory contains scripts and other things useful for developing
and maintaining Emacs.  These files are not part of Emacs releases
because they are not deemed generally useful, and you have to know
what you do when using them.


* Instructions and scripts used to prepare an Emacs release.

** FOR-RELEASE

Living list of activities that must be completed before the next release.

** make-tarball.txt

Instructions to create pretest or release tarballs, announcements, etc.

** admin.el

Utilities for setting version numbers and alike.


* Scripts that can be used to build and test Emacs.

** build-configs

Build Emacs in various configurations.

** make-emacs

Build Emacs in various ways.

** quick-install-emacs

Install emacs quickly (`incrementally').

** alloc-colors.c

A utility program that allocates a given number of colors on X.  Can
be used to debug Emacs with dense colormaps (PseudoColor).

** check-doc-strings

Check doc strings against documentation.

** cus-test.el

Tests for custom types and load problems.

** diff-tar-files

Show files added/removed between two tar files.


Brief description of sub-directories:

charsets		scripts for generating charset map files
			in ../etc/charsets
unidata			scripts for generating character property files
			in ../lisp/international


This file is part of GNU Emacs.

GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.

Local variables:
mode: outline
paragraph-separate: "[ 	]*$"
end: