about summary refs log tree commit diff
path: root/catgets/open_catalog.c
diff options
context:
space:
mode:
Diffstat (limited to 'catgets/open_catalog.c')
-rw-r--r--catgets/open_catalog.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/catgets/open_catalog.c b/catgets/open_catalog.c
index 674a0c1bf0..8c563b2e26 100644
--- a/catgets/open_catalog.c
+++ b/catgets/open_catalog.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.org>.
 
@@ -30,6 +30,7 @@
 #include <sys/stat.h>
 
 #include "catgetsinfo.h"
+#include <not-cancel.h>
 
 
 #define SWAPU32(w) bswap_32 (w)
@@ -49,7 +50,7 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var,
   int result = -1;
 
   if (strchr (cat_name, '/') != NULL || nlspath == NULL)
-    fd = __open (cat_name, O_RDONLY);
+    fd = open_not_cancel_2 (cat_name, O_RDONLY);
   else
     {
       const char *run_nlspath = nlspath;
@@ -177,7 +178,7 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var,
 
 	  if (bufact != 0)
 	    {
-	      fd = __open (buf, O_RDONLY);
+	      fd = open_not_cancel_2 (buf, O_RDONLY);
 	      if (fd >= 0)
 		break;
 	    }
@@ -233,8 +234,8 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var,
       /* Save read, handle partial reads.  */
       do
 	{
-	  size_t now = __read (fd, (((char *) catalog->file_ptr)
-				    + (st.st_size - todo)), todo);
+	  size_t now = read_not_cancel (fd, (((char *) catalog->file_ptr)
+					     + (st.st_size - todo)), todo);
 	  if (now == 0 || now == (size_t) -1)
 	    {
 #ifdef EINTR
@@ -324,7 +325,7 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var,
 
   /* Release the lock again.  */
  close_unlock_return:
-  __close (fd);
+  close_not_cancel_no_status (fd);
 
   return result;
 }