summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-04-19 16:57:17 +0000
committerUlrich Drepper <drepper@redhat.com>2003-04-19 16:57:17 +0000
commit2c008571c3ad156479307b7e23185ae566b5776a (patch)
treef3bad7f0e95a6d172e6577b7e2d557602e1f446c /posix
parent76a67697c890d292d9f32e88cf24f8a3f74e47b9 (diff)
downloadglibc-2c008571c3ad156479307b7e23185ae566b5776a.tar.gz
glibc-2c008571c3ad156479307b7e23185ae566b5776a.tar.xz
glibc-2c008571c3ad156479307b7e23185ae566b5776a.zip
Update.
2003-04-19  Ulrich Drepper  <drepper@redhat.com>

	* catgets/nl_types.h: Remove __THROW marker from cancellation points.
	* dirent/dirent.h: Likewise.
	* dlfcn/dlfcn.h: Likewise.
	* grp/grp.h: Likewise.
	* iconv/iconv.h: Likewise.
	* io/fcntl.h: Likewise.
	* io/ftw.h: Likewise.
	* libio/stdio.h: Likewise.
	* misc/sys/mman.h: Likewise.
	* misc/sys/select.h: Likewise.
	* misc/sys/syslog.h: Likewise.
	* misc/sys/uio.h: Likewise.
	* posix/spawn.h: Likewise.
	* posix/unistd.h: Likewise.
	* posix/sys/wait.h: Likewise.
	* pwd/pwd.h: Likewise.
	* resolv/netdb.h: Likewise.
	* rt/aio.h: Likewise.
	* shadow/shadow.h: Likewise.
	* signal/signal.h: Likewise.
	* socket/sys/socket.h: Likewise.
	* stdlib/stdlib.h: Likewise.
	* streams/stropts.h: Likewise.
	* string/string.h: Likewise.
	* sysdeps/gnu/utmpx.h: Likewise.
	* sysvipc/sys/msg.h: Likewise.
	* termios/termios.h: Likewise.
	* time/time.h: Likewise.
	* wcsmbs/wchar.h: Likewise.
	* iconv/gconv_cache.c: Include <not-cancel.h> and use non-cancelable
	functions.
	* misc/daemon.c: Likewise.
	* sysdeps/generic/backtracesymsfd.c: Likewise.
	* sysdeps/generic/check_fds.c: Likewise.
	* sysdeps/unix/sysv/linux/gethostid.c: Likewise.
	* sysdeps/unix/sysv/linux/not-cancel.h: New file.
	* sysdeps/generic/not-cancel.h: New file.
	* csu/Makefile (distribute): Add not-cancel.h.
	* sysdeps/unix/sysv/linux/fatal-prepare.h: New file.
	* sysdeps/unix/sysv/linux/Makefile: Define FATAL_PREPARE_INCLUDE
	for assert.c and assert-perr.c to include <fatal-prepare.h>.
	* sysdeps/unix/sysv/linux/Dist: Add fatal-prepare.h.

	* sysdeps/posix/remove.c (remove): Rewrite.  No need to restore
	errno and unlink first.

	* io/ftw.c (ftw_dir): In all places assume fchdir is available.

2003-04-18  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/libc_fatal.c (__libc_fatal): Use
	INTERNAL_SYSCALL instead of INLINE_SYSCALL.
Diffstat (limited to 'posix')
-rw-r--r--posix/spawn.h16
-rw-r--r--posix/sys/wait.h23
-rw-r--r--posix/unistd.h117
3 files changed, 109 insertions, 47 deletions
diff --git a/posix/spawn.h b/posix/spawn.h
index 92ee94007e..09b1e9f8e4 100644
--- a/posix/spawn.h
+++ b/posix/spawn.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX spawn interface.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -62,20 +62,26 @@ typedef struct
 __BEGIN_DECLS
 
 /* Spawn a new process executing PATH with the attributes describes in *ATTRP.
-   Before running the process perform the actions described in FILE-ACTIONS. */
+   Before running the process perform the actions described in FILE-ACTIONS.
+
+   This function is a possible cancellation points and therefore not
+   marked with __THROW. */
 extern int posix_spawn (pid_t *__restrict __pid,
 			__const char *__restrict __path,
 			__const posix_spawn_file_actions_t *__restrict
 			__file_actions,
 			__const posix_spawnattr_t *__restrict __attrp,
 			char *__const argv[__restrict_arr],
-			char *__const envp[__restrict_arr]) __THROW;
+			char *__const envp[__restrict_arr]);
+
+/* Similar to `posix_spawn' but search for FILE in the PATH.
 
-/* Similar to `posix_spawn' but search for FILE in the PATH.  */
+   This function is a possible cancellation points and therefore not
+   marked with __THROW.  */
 extern int posix_spawnp (pid_t *__pid, __const char *__file,
 			 __const posix_spawn_file_actions_t *__file_actions,
 			 __const posix_spawnattr_t *__attrp,
-			 char *__const argv[], char *__const envp[]) __THROW;
+			 char *__const argv[], char *__const envp[]);
 
 
 /* Initialize data structure with attributes for `spawn' to default values.  */
diff --git a/posix/sys/wait.h b/posix/sys/wait.h
index 03ac5fe35d..e758f9e3ff 100644
--- a/posix/sys/wait.h
+++ b/posix/sys/wait.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1994,1996-2001,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -105,8 +105,11 @@ typedef enum
 
 
 /* Wait for a child to die.  When one does, put its status in *STAT_LOC
-   and return its process ID.  For errors, return (pid_t) -1.  */
-extern __pid_t wait (__WAIT_STATUS __stat_loc) __THROW;
+   and return its process ID.  For errors, return (pid_t) -1.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern __pid_t wait (__WAIT_STATUS __stat_loc);
 
 #ifdef	__USE_BSD
 /* Special values for the PID argument to `waitpid' and `wait4'.  */
@@ -125,8 +128,11 @@ extern __pid_t wait (__WAIT_STATUS __stat_loc) __THROW;
    is not already dead, return (pid_t) 0.  If successful,
    return PID and store the dead child's status in STAT_LOC.
    Return (pid_t) -1 for errors.  If the WUNTRACED bit is
-   set in OPTIONS, return status for stopped children; otherwise don't.  */
-extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options) __THROW;
+   set in OPTIONS, return status for stopped children; otherwise don't.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
 
 #if defined __USE_SVID || defined __USE_XOPEN
 # define __need_siginfo_t
@@ -138,9 +144,12 @@ extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options) __THROW;
    If IDTYPE is P_ALL, match any process.
    If the WNOHANG bit is set in OPTIONS, and that child
    is not already dead, clear *INFOP and return 0.  If successful, store
-   exit code and status in *INFOP.  */
+   exit code and status in *INFOP.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
 extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,
-		   int __options) __THROW;
+		   int __options);
 #endif
 
 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
diff --git a/posix/unistd.h b/posix/unistd.h
index e2bcf8d3fc..6fdfa0d937 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -298,31 +298,51 @@ extern __off64_t __REDIRECT (lseek,
 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) __THROW;
 #endif
 
-/* Close the file descriptor FD.  */
-extern int close (int __fd) __THROW;
+/* Close the file descriptor FD.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int close (int __fd);
 
 /* Read NBYTES into BUF from FD.  Return the
-   number read, -1 for errors or 0 for EOF.  */
-extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __THROW;
+   number read, -1 for errors or 0 for EOF.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern ssize_t read (int __fd, void *__buf, size_t __nbytes);
+
+/* Write N bytes of BUF to FD.  Return the number written, or -1.
 
-/* Write N bytes of BUF to FD.  Return the number written, or -1.  */
-extern ssize_t write (int __fd, __const void *__buf, size_t __n) __THROW;
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern ssize_t write (int __fd, __const void *__buf, size_t __n);
 
 #ifdef __USE_UNIX98
 # ifndef __USE_FILE_OFFSET64
-extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
-     __THROW;
+/* Read NBYTES into BUF from FD at the given position OFFSET without
+   changing the file pointer.  Return the number read, -1 for errors
+   or 0 for EOF.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
+		      __off_t __offset);
+
+/* Write N bytes of BUF to FD at the given position OFFSET without
+   changing the file pointer.  Return the number written, or -1.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
 extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
-		       __off_t __offset) __THROW;
+		       __off_t __offset);
 # else
 #  ifdef __REDIRECT
 extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
-				   __off64_t __offset) __THROW,
+				   __off64_t __offset),
 			   pread64);
 extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
-				    size_t __nbytes, __off64_t __offset)
-			   __THROW,
-			pwrite64);
+				    size_t __nbytes, __off64_t __offset),
+			   pwrite64);
 #  else
 #   define pread pread64
 #   define pwrite pwrite64
@@ -334,11 +354,11 @@ extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
    changing the file pointer.  Return the number read, -1 for errors
    or 0 for EOF.  */
 extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
-			__off64_t __offset) __THROW;
+			__off64_t __offset);
 /* Write N bytes of BUF to FD at the given position OFFSET without
    changing the file pointer.  Return the number written, or -1.  */
 extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
-			 __off64_t __offset) __THROW;
+			 __off64_t __offset);
 # endif
 #endif
 
@@ -363,8 +383,11 @@ extern unsigned int alarm (unsigned int __seconds) __THROW;
    If a signal handler does a `longjmp' or modifies the handling of the
    SIGALRM signal while inside `sleep' call, the handling of the SIGALRM
    signal afterwards is undefined.  There is no return value to indicate
-   error, but if `sleep' returns SECONDS, it probably didn't work.  */
-extern unsigned int sleep (unsigned int __seconds) __THROW;
+   error, but if `sleep' returns SECONDS, it probably didn't work.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern unsigned int sleep (unsigned int __seconds);
 
 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
 /* Set an alarm to go off (generating a SIGALRM signal) in VALUE
@@ -375,14 +398,20 @@ extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
      __THROW;
 
 /* Sleep USECONDS microseconds, or until a signal arrives that is not blocked
-   or ignored.  */
-extern int usleep (__useconds_t __useconds) __THROW;
+   or ignored.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int usleep (__useconds_t __useconds);
 #endif
 
 
 /* Suspend the process until a signal arrives.
-   This always returns -1 and sets `errno' to EINTR.  */
-extern int pause (void) __THROW;
+   This always returns -1 and sets `errno' to EINTR.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int pause (void);
 
 
 /* Change the owner and group of FILE.  */
@@ -670,12 +699,18 @@ extern __pid_t vfork (void) __THROW;
 
 
 /* Return the pathname of the terminal FD is open on, or NULL on errors.
-   The returned storage is good only until the next call to this function.  */
-extern char *ttyname (int __fd) __THROW;
+   The returned storage is good only until the next call to this function.
+
+   This function is a possible cancellation points and therefore not
+   marked with __THROW.  */
+extern char *ttyname (int __fd);
 
 /* Store at most BUFLEN characters of the pathname of the terminal FD is
-   open on in BUF.  Return 0 on success, otherwise an error number.  */
-extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __THROW;
+   open on in BUF.  Return 0 on success, otherwise an error number.
+
+   This function is a possible cancellation points and therefore not
+   marked with __THROW.  */
+extern int ttyname_r (int __fd, char *__buf, size_t __buflen);
 
 /* Return 1 if FD is a valid descriptor associated
    with a terminal, zero if not.  */
@@ -717,13 +752,19 @@ extern __pid_t tcgetpgrp (int __fd) __THROW;
 extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __THROW;
 
 
-/* Return the login name of the user.  */
-extern char *getlogin (void) __THROW;
+/* Return the login name of the user.
+
+   This function is a possible cancellation points and therefore not
+   marked with __THROW.  */
+extern char *getlogin (void);
 #if defined __USE_REENTRANT || defined __USE_UNIX98
 /* Return at most NAME_LEN characters of the login name of the user in NAME.
    If it cannot be determined or some other error occurred, return the error
-   code.  Otherwise return 0.  */
-extern int getlogin_r (char *__name, size_t __name_len) __THROW;
+   code.  Otherwise return 0.
+
+   This function is a possible cancellation points and therefore not
+   marked with __THROW.  */
+extern int getlogin_r (char *__name, size_t __name_len);
 #endif
 
 #ifdef	__USE_BSD
@@ -815,8 +856,11 @@ extern char *getpass (__const char *__prompt) __THROW;
 
 
 #if defined __USE_BSD || defined __USE_XOPEN
-/* Make all changes done to FD actually appear on disk.  */
-extern int fsync (int __fd) __THROW;
+/* Make all changes done to FD actually appear on disk.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int fsync (int __fd);
 #endif /* Use BSD || X/Open.  */
 
 
@@ -910,7 +954,10 @@ extern long int syscall (long int __sysno, ...) __THROW;
 
 /* `lockf' is a simpler interface to the locking facilities of `fcntl'.
    LEN is always relative to the current file position.
-   The CMD argument is one of the following.  */
+   The CMD argument is one of the following.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
 
 # define F_ULOCK 0	/* Unlock a previously locked region.  */
 # define F_LOCK  1	/* Lock a region for exclusive use.  */
@@ -918,17 +965,17 @@ extern long int syscall (long int __sysno, ...) __THROW;
 # define F_TEST  3	/* Test a region for other processes locks.  */
 
 # ifndef __USE_FILE_OFFSET64
-extern int lockf (int __fd, int __cmd, __off_t __len) __THROW;
+extern int lockf (int __fd, int __cmd, __off_t __len);
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len) __THROW,
+extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len),
 		       lockf64);
 #  else
 #   define lockf lockf64
 #  endif
 # endif
 # ifdef __USE_LARGEFILE64
-extern int lockf64 (int __fd, int __cmd, __off64_t __len) __THROW;
+extern int lockf64 (int __fd, int __cmd, __off64_t __len);
 # endif
 #endif /* Use misc and F_LOCK not already defined.  */