[PATCH] g10: remove g10/signal.c.

NIIBE Yutaka gniibe at fsij.org
Tue May 26 04:07:41 CEST 2015


Hello,

This is a clean up.  I noticed this during grepping the code.

g10/signal.c should be removed.

In the commit 5c46f134e22d57fafc901c95350fad11efc10516 (2003-06-27),
we had the last change (context is g10/):

    2003-06-24  Werner Koch  <wk at gnupg.org>

	* Makefile.am: Removed signal.c

	* g10.c (emergency_cleanup): New.
	(main): Use gnupg_init_signals and register malloc for assuan.

>From this point, we don't need g10/signal.c any more, since we have
common/signal.c.

Following is a patch to finish the removal.

The lines in g10/main.h is old ones not used after 2003-06-27.  The
call in g10/tdbio.c is dead code now (#ifdef-out-ed), but just in case
we will enable it.

OK to commit (together with the removal of g10/signal.c)?


diff --git a/g10/main.h b/g10/main.h
index a89f711..9370ae5 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -379,11 +379,6 @@ int hash_datafile_by_fd ( gcry_md_hd_t md, gcry_md_hd_t md2, int data_fd,
                           int textmode );
 PKT_plaintext *setup_plaintext_name(const char *filename,IOBUF iobuf);

-/*-- signal.c --*/
-void init_signals(void);
-void block_all_signals(void);
-void unblock_all_signals(void);
-
 /*-- server.c --*/
 int gpg_server (ctrl_t);
 gpg_error_t gpg_proxy_pinentry_notify (ctrl_t ctrl,
diff --git a/g10/tdbio.c b/g10/tdbio.c
index 69438b4..98a7773 100644
--- a/g10/tdbio.c
+++ b/g10/tdbio.c
@@ -378,10 +378,10 @@ tdbio_end_transaction()
 	else
 	    is_locked = 1;
     }
-    block_all_signals();
+    gnupg_block_all_signals();
     in_transaction = 0;
     rc = tdbio_sync();
-    unblock_all_signals();
+    gnupg_unblock_all_signals();
     if( !opt.lock_once ) {
 	if( !dotlock_release (lockhandle) )
 	    is_locked = 0;
--



More information about the Gnupg-devel mailing list