bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dd hangs with SIGINT


From: Guillaume Chazarain
Subject: Re: dd hangs with SIGINT
Date: Thu, 07 Apr 2005 16:52:04 +0200
User-agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324)

Jim Meyering wrote:

If there is no better way to solve the problem, then I'd consider
leaving the code the way it is.
Don't forget, there is my workaround, it stills cause gettext() calls in the signal handler,
but I cannot make it fail, unlike vanilla.

--- coreutils-5.3.0/src/dd.c
+++ coreutils-5.3.0/src/dd.c
@@ -1535,6 +1535,14 @@
#endif
    }

+  {
+    /*
+ * Initialize gettext here, so that we are sure it won't happen in a signal handler. + * Lower the burden on translators by avoiding to mark this meaningless string.
+     */
+    const char *tmp_msg = "x";
+    tmp_msg = _(tmp_msg);
+  }
  install_handler (SIGINT, interrupt_handler);
  install_handler (SIGQUIT, interrupt_handler);
  install_handler (SIGPIPE, interrupt_handler);


Regards.

--
Guillaume




reply via email to

[Prev in Thread] Current Thread [Next in Thread]