about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-04 20:42:48 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-04 20:42:48 +0000
commit43cd993307eae39754e15dc7f625e630ce2c0b88 (patch)
tree4d5469f71d8ded6c2ae44490eb7c0f3008771f1f
parent29bc410c29ee2185bf91bf5fa923d8646ee9d501 (diff)
downloadglibc-43cd993307eae39754e15dc7f625e630ce2c0b88.tar.gz
glibc-43cd993307eae39754e15dc7f625e630ce2c0b88.tar.xz
glibc-43cd993307eae39754e15dc7f625e630ce2c0b88.zip
Update.
2003-01-04  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/posix/system.c (do_system): Correct reference counter in
	case SIGQUIT handler installation failed.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/posix/system.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7838c04afc..916a26f492 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-04  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/posix/system.c (do_system): Correct reference counter in
+	case SIGQUIT handler installation failed.
+
 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
 
 	* include/libc-symbols.h [HAVE_WEAK_SYMBOLS] (_weak_extern):
diff --git a/sysdeps/posix/system.c b/sysdeps/posix/system.c
index 08852801a6..fddb4f08ac 100644
--- a/sysdeps/posix/system.c
+++ b/sysdeps/posix/system.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-99,2000,02 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2000, 2002, 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
@@ -49,7 +49,7 @@ __libc_lock_define_initialized (static, lock);
 # define DO_LOCK()
 # define DO_UNLOCK()
 # define INIT_LOCK()
-# define ADD_REF() (void) 0
+# define ADD_REF() 0
 # define SUB_REF() 0
 #endif
 
@@ -84,6 +84,7 @@ do_system (const char *line)
       if (__sigaction (SIGQUIT, &sa, &quit) < 0)
 	{
 	  save = errno;
+	  SUB_REF ();
 	  goto out_restore_sigint;
 	}
     }
@@ -103,7 +104,7 @@ do_system (const char *line)
 	  if (SUB_REF () == 0)
 	    {
 	      (void) __sigaction (SIGQUIT, &quit, (struct sigaction *) NULL);
-	out_restore_sigint:
+	    out_restore_sigint:
 	      (void) __sigaction (SIGINT, &intr, (struct sigaction *) NULL);
 	    }
 	  DO_UNLOCK ();