<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.network.jabber.ekg2.devel">
    <title>gmane.network.jabber.ekg2.devel</title>
    <link>http://blog.gmane.org/gmane.network.jabber.ekg2.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1573"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1572"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1571"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1570"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1569"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1568"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1567"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1566"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1565"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1564"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1563"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1562"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1561"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1560"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1559"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1558"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1557"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1556"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1555"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1554"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1573">
    <title>Re: [root&lt; at &gt;toxygen.net: Cron &lt;deletek&lt; at &gt;toxygen&gt; . $HOME/ekg2-website/website-scripts/common.sh; logging_start install-website; cd $HOME/ekg2-website &amp;&amp; git pull &amp;&amp; ./website-scripts/install-website $website (failed)]</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1573</link>
    <description>&lt;pre&gt;
Tak, były baszyzmy, a #!/bin/bash nie pomaga jeśli skrypt jest czytany
przez "." :-)
Już zmieniłem cronjob żeby deklarował odpowiedni shell.

&lt;/pre&gt;</description>
    <dc:creator>Marcin Owsiany</dc:creator>
    <dc:date>2012-04-23T10:39:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1572">
    <title>Re: [root&lt; at &gt;toxygen.net: Cron &lt;deletek&lt; at &gt;toxygen&gt; . $HOME/ekg2-website/website-scripts/common.sh; logging_start install-website; cd $HOME/ekg2-website &amp;&amp; git pull &amp;&amp; ./website-scripts/install-website $website (failed)]</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1572</link>
    <description>&lt;pre&gt;Dnia 2012-04-16, pon o godzinie 08:30 +0100, Marcin Owsiany pisze:

Nie, nie, ktoś zrobił dist-upgrade, które domyślnym shellem zrobiło
dasha. Nie mam dostępu do tego pliku z poziomu zwykłego użytkownika,
więc nie wiem, czy zaplątał się tam jakiś bashizm czy może dash za
bardzo się różni od ksh. Jeśli to drugie, dajcie znać, przywrócę starą
konfigurację.

Pozdr,
Wojtek


&lt;/pre&gt;</description>
    <dc:creator>Wojtek Kaniewski</dc:creator>
    <dc:date>2012-04-16T18:15:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1571">
    <title>Re: [root&lt; at &gt;toxygen.net: Cron &lt;deletek&lt; at &gt;toxygen&gt; . $HOME/ekg2-website/website-scripts/common.sh; logging_start install-website; cd $HOME/ekg2-website &amp;&amp; git pull &amp;&amp; ./website-scripts/install-website $website (failed)]</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1571</link>
    <description>&lt;pre&gt;
A nie, po prostu domyślna powłoka zmieniła się na dash, który nie łyka
bashowej składni definicji funkcji.
Dodałem SHELL=/bin/bash do crontaba.

&lt;/pre&gt;</description>
    <dc:creator>Marcin Owsiany</dc:creator>
    <dc:date>2012-04-16T18:21:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1570">
    <title>[root&lt; at &gt;toxygen.net: Cron &lt;deletek&lt; at &gt;toxygen&gt; . $HOME/ekg2-website/website-scripts/common.sh; logging_start install-website; cd $HOME/ekg2-website &amp;&amp; git pull &amp;&amp; ./website-scripts/install-website $website (failed)]</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1570</link>
    <description>&lt;pre&gt;Wygląda na to, że ktoś wczoraj wieczorem na maszynie na której jest
strona WWW wprowadził błąd do pliku common.sh, a nie wysłał zmiany do
github.com/porridge/ekg2-website.git...

&lt;/pre&gt;</description>
    <dc:creator>Marcin Owsiany</dc:creator>
    <dc:date>2012-04-16T07:30:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1569">
    <title>Re: Locking for debug handler</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1569</link>
    <description>&lt;pre&gt;Odpisuję teraz, bo byłem na urlopie.

On Mon, Feb 13, 2012 at 01:41:16PM +0100, Jakub Zawadzki wrote:

Fakt.


Hm, nie sądziłem że wyścig jest związany z tą statyczną zmienną, prawdę
mówiąc nie zauważyłem jej aż do Twojego maila. Po prostu wydawało mi
się, że mutex w tym miejscu rozwiąże wszystkie problemy związane ze
współbieżnym wywołaniem ekg_debug_handler. Ale nie pomyślałem, że gdy
wątek resolvera wywołuje print_window_w poprzez ekg_debug_handler, to
główny wątek ekg2 może wykonywać print_window_w wywołane gdzieś indziej
- w tym przypadku rzecz jasna mutex nie pomaga ani trochę.


Right, however just the handler needs to thread-safe, which may be
easier than making the whole program thread-safe.

I can see two possibilities:
1) (your suggestion) change libgadu to (optionally) not call the debug
handler in threaded resolver.
 (+) straightforward solution
 (-) need to convince libgadu upstream to implement such option
 (-) users need a new libgadu to have the fix
 (-) we lose debugging in threaded resolver altogether

2) change ekg_debug_handler to thread-safely store messages in a static
variable, and only propagate them further when it's being called from
the main thread. One way of implementing this would be to split off an
ekg_threadsafe_debug_handler function.
 (+) applicable to other plugins in the future
 (-) more complex
 (-) visible effects of any debug handler calls from external libraries
     (not just the asynchronous calls) are delayed until a debug call
     from core

So I guess it mostly boils down to whether we prefer to lose the
asynchronous debug info or see a delay in the external debug calls. :-/

&lt;/pre&gt;</description>
    <dc:creator>Marcin Owsiany</dc:creator>
    <dc:date>2012-02-18T16:22:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1568">
    <title>Re: ncurses-online-redraw</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1568</link>
    <description>&lt;pre&gt;
"display_mode" brzmi dość ogólnie i mało konkretnie. Proponowałbym
raczej coś w stylu "indent_lines" albo "display_indent", z wartościami
odpowiednio:


0 = multiple_timestamp


1 = indent_prompted


2 = indent_all

&lt;/pre&gt;</description>
    <dc:creator>Marcin Owsiany</dc:creator>
    <dc:date>2012-02-18T15:06:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1567">
    <title>Re: Locking for debug handler</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1567</link>
    <description>&lt;pre&gt;
Wiesz, ten kod mial pozwalac aby mozna bylo wywolywac 
wiele razy debug() bez \n i ekg2 sobie to mialo łączyć w jedną linijke.

Jeśli debug handler może być wywoływany z wielu wątków, to przestaje mieć
to sens i lepiej ten kod wywalić /a nie dokładać muteksy/.
Co nie powinno być takie trudne, bo w większości wypadków jedno
wywoływanie debug - jedna linijka.

A ta łatka którą proponujesz naprawia jeden z wielu możliwych błędów.
Obawiam się, że potem ich trzeba będzie ich szukać np. w handlerach UI_WINDOW_PRINT.
Dlatego lepiej:


To call debug handler only from main thread, and IMHO it should be fixed 
in libgadu cause it currently assumes that program is thread-safe. 
Which for ekg2 is not true.

Takie moje 3 grosze (z zaznaczenie, że nie deweloperuje).

&lt;/pre&gt;</description>
    <dc:creator>Jakub Zawadzki</dc:creator>
    <dc:date>2012-02-13T12:41:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1566">
    <title>Re: ncurses-online-redraw</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1566</link>
    <description>&lt;pre&gt;[...]
[...]
Mój algorytm: 1) napisz; 2) wyślij; 3) sprawdź;
okazał się zawodny.
Dzięki za zwrócenie uwagi.

Pozdrawiam,
    wiechu

&lt;/pre&gt;</description>
    <dc:creator>Wiesław Ochmiński</dc:creator>
    <dc:date>2012-02-02T12:15:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1565">
    <title>Re: ncurses-online-redraw</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1565</link>
    <description>&lt;pre&gt;On Thu, 2 Feb 2012 12:48:34 +0100
Wiesław Ochmiński &amp;lt;wiechu&amp;lt; at &amp;gt;wiechu.com&amp;gt; wrote:


Że się tak wyrażę niezrozumiale i skomplikowanie:

&amp;lt;stdin&amp;gt;:13:8: error: duplicate case value '1'
                case mode2:
                     ^
&amp;lt;stdin&amp;gt;:11:8: note: previous case defined here
                case mode1:
                     ^

&lt;/pre&gt;</description>
    <dc:creator>Michał Górny</dc:creator>
    <dc:date>2012-02-02T12:02:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1564">
    <title>ncurses-online-redraw</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1564</link>
    <description>&lt;pre&gt;Kłaniam!

Przerobiłem sposób wyświetlania w ncurses i zrobiłem to w osobnej gałęzi, bo
to kontrrewolucja, a nie drobne zmiany:
   - wywaliłem 'struct screen_line' i wszystko co z tym było związane
   - w związku z tym zawartość okien nie jest przeliczana na zapas, a tylko
     przy wyświetlaniu danego okna

Tak więc przy pokazaniu lub ukryciu okna kontaktów nie musimy przeliczać
10000 linii okna debug, do którego i tak nie zaglądaliśmy i nie mamy zamiaru
robić tego w przewidywalnej przyszłości.

Wprowadziłem też zmienną 'ncurses:display_mode', która odpowiada za styl
wyświetlania zawartości okien.

ncurses:display_mode = 0 (classic) -- wszystko tak jak dotychczas.


ncurses:display_mode = 1 (mode1) -- (jak to nazwać?)

12:43:50 Długie linie wyświetlane są w ten sposób, że w timestamp jest
wyświetlany tylko w pierwszej linii, a w kolejnych już nie. Wyjątek stanowią
linie, które mają 'prompt', jak ta następna.
12:45:20 ::: Długa linia z promptem też nie powtarza timestampu w kolejnych
         ::: wierszach, ale prompt jest wyrównany do tego z pierwszej linii


ncurses:display_mode = 1 (mode2) -- (jak to nazwać?

12:46:18 Przy takim ustawieniu timestamp jest również wyświetlany wyłącznie w
         pierwszej linii, ale linie są wyrównane. W tym przypadku nie ma
 żadnego wyjątku dla linii z promptem.



Zapraszam do testów, najlepiej z ustawionym 
ncurses:backlog_scroll_half_page = 0 (off), bo przewijanie o pół strony, to
żadna sztuka. W wolnej chwili poprawię przewijanie stron, na których znajduje
się znacznik (/mark), bo to i dotychczas nie działało zbyt dobrze (eufemizm).

Po uzupełnieniu dokumentacji będę chciał to włączyć do master.

Proszę o opinie.

Pozdrawiam,
    wiechu


&lt;/pre&gt;</description>
    <dc:creator>Wiesław Ochmiński</dc:creator>
    <dc:date>2012-02-02T11:48:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1563">
    <title>Re: Locking for debug handler</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1563</link>
    <description>&lt;pre&gt;
Because it does not solve the general case. Imagine libgadu resolver
thread calling ekg_debug_handler at the same time as another plugin
calling the same debug handler.


I don't see how this could be solved in libgadu?


I don't remember the exact rules, but isn't it OK to fork from the main
thread?

&lt;/pre&gt;</description>
    <dc:creator>Marcin Owsiany</dc:creator>
    <dc:date>2012-01-28T10:05:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1562">
    <title>Re: Locking for debug handler</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1562</link>
    <description>&lt;pre&gt;Hi,

On Fri, Jan 27, 2012 at 09:32:42PM +0000, Marcin Owsiany wrote:

Why not put it in gg plugin, i.e: libgadu_debug_handler()? or fixed in libgadu?

Actually I believe we have bigger problem when libgadu is configured
with pthread, cause AFAIR you SHOULDN'T use both fork() and threads...

Regards,
 Kuba.

&lt;/pre&gt;</description>
    <dc:creator>Jakub Zawadzki</dc:creator>
    <dc:date>2012-01-27T21:48:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1561">
    <title>Locking for debug handler</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1561</link>
    <description>&lt;pre&gt;Please review.

&lt;/pre&gt;</description>
    <dc:creator>Marcin Owsiany</dc:creator>
    <dc:date>2012-01-27T21:32:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1560">
    <title>Re: bugtracker down</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1560</link>
    <description>&lt;pre&gt;
Naprawione. Administracja przeprasza za zaistniałą sytuację.

l.

&lt;/pre&gt;</description>
    <dc:creator>Leszek Krupiński</dc:creator>
    <dc:date>2012-01-27T11:41:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1559">
    <title>bugtracker down</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1559</link>
    <description>&lt;pre&gt;:-/

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine
administrator for assistance.

If you are the Redmine administrator, check your log files for details
about the error.

Back

&lt;/pre&gt;</description>
    <dc:creator>Marcin Owsiany</dc:creator>
    <dc:date>2012-01-27T10:45:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1558">
    <title>Re: Fix for #124: Deadlock in fatal signal handler</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1558</link>
    <description>&lt;pre&gt;
The key word there was "unreliably". Obviously it won't save anything if
it deadlocks :-/


Perhaps periodic or message-triggered commits would fulfil your need
better, and additionally cover for things like OOM killer and people
tripping on power cables?

&lt;/pre&gt;</description>
    <dc:creator>Marcin Owsiany</dc:creator>
    <dc:date>2012-01-01T18:11:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1557">
    <title>Re: Fix for #124: Deadlock in fatal signal handler</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1557</link>
    <description>&lt;pre&gt;On Sun,  1 Jan 2012 10:54:58 +0000
porridge&amp;lt; at &amp;gt;debian.org wrote:


Depends to whom. I personally care more about having my logs being
saved (to not lose messages which I haven't read yet), and that
involves committing to sqlite.

&lt;/pre&gt;</description>
    <dc:creator>Michał Górny</dc:creator>
    <dc:date>2012-01-01T17:59:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1556">
    <title>[PATCH 2/3] Helper macro for ignoring results withoutwarnings.</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1556</link>
    <description>&lt;pre&gt;From: Marcin Owsiany &amp;lt;marcin&amp;lt; at &amp;gt;owsiany.pl&amp;gt;

---
 ekg/stuff.c |    4 ++++
 ekg/stuff.h |    8 ++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/ekg/stuff.c b/ekg/stuff.c
index 4851680..d5522aa 100644
--- a/ekg/stuff.c
+++ b/ekg/stuff.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1817,6 +1817,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int isalpha_pl(unsigned char c)
 return 0;
 }
 
+inline void ignore_result_helper(int __attribute__((unused)) dummy, ...)
+{
+}
+
 /*
  * strcasestr()
  *
diff --git a/ekg/stuff.h b/ekg/stuff.h
index ea257d5..5520abb 100644
--- a/ekg/stuff.h
+++ b/ekg/stuff.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -289,6 +289,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int isalpha_pl(unsigned char c);
 #define xtolower(c) tolower((int) (unsigned char) c)
 #define xtoupper(c) toupper((int) (unsigned char) c)
 
+inline void ignore_result_helper(int __attribute__((unused)) dummy, ...);
+
+#ifdef __GNUC__
+# define IGNORE_RESULT(X) ignore_result_helper(0, (X))
+#else
+# define IGNORE_RESULT(X) (X)
+#endif
+
 const char *ekg_status_label(const int status, const char *descr, const char *prefix);
 void ekg_update_status(session_t *session);
 #define ekg_update_status_n(a) ekg_update_status(session_find(a))
&lt;/pre&gt;</description>
    <dc:creator>porridge&lt; at &gt;debian.org</dc:creator>
    <dc:date>2012-01-01T10:55:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1555">
    <title>[PATCH 3/3] Make the fatal signal handlers async-signal-safe again.</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1555</link>
    <description>&lt;pre&gt;From: Marcin Owsiany &amp;lt;marcin&amp;lt; at &amp;gt;owsiany.pl&amp;gt;

Currently ekg2 likes to deadlock when it segfaults in a malloc/free because the
debug functions try to execute malloc/free again, and they are not necessarily
reentrant.

Remove a lot of the fancy things that ekg2 does on such signals and keep the
bare minimum with the goal of being able to produce usable corefiles again and
restoring terminal state to sanity.

Also, no longer change the current directory to the config dir - users
generally expect programs to dump core in the directory they were started in.
---
 docs/ekg2book-en/develbook.xml |    2 +-
 docs/ekg2book/develbook.xml    |    2 +-
 ekg/abort.h                    |    4 +-
 ekg/configfile.c               |   40 ------------
 ekg/configfile.h               |    1 -
 ekg/ekg.c                      |  129 +++++++++++++--------------------------
 ekg/userlist.c                 |   51 ----------------
 ekg/userlist.h                 |    1 -
 ekg2.h                         |    1 +
 plugins/ncurses/mouse.c        |   16 ++++-
 plugins/ncurses/nc-stuff.c     |    7 ++
 11 files changed, 70 insertions(+), 184 deletions(-)

diff --git a/docs/ekg2book-en/develbook.xml b/docs/ekg2book-en/develbook.xml
index e243e57..3f71f92 100644
--- a/docs/ekg2book-en/develbook.xml
+++ b/docs/ekg2book-en/develbook.xml
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -306,7 +306,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; plugin &amp;lt;nazwa&amp;gt;
       &amp;lt;/para&amp;gt;
       &amp;lt;screen&amp;gt;
 &amp;lt;![CDATA[
-$ gdb ekg ~/.ekg2/core.&amp;lt;pid&amp;gt;
+$ gdb ekg core
 GNU gdb 5.0 (UI_OUT)
 Copyright 2000 Free Software Foundation, Inc.
 (...)
diff --git a/docs/ekg2book/develbook.xml b/docs/ekg2book/develbook.xml
index 2b9ce2e..949d0b3 100644
--- a/docs/ekg2book/develbook.xml
+++ b/docs/ekg2book/develbook.xml
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -304,7 +304,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; plugin &amp;lt;nazwa&amp;gt;
       &amp;lt;/para&amp;gt;
       &amp;lt;screen&amp;gt;
 &amp;lt;![CDATA[
-$ gdb ekg ~/.ekg2/core.&amp;lt;pid&amp;gt;
+$ gdb ekg core
 GNU gdb 5.0 (UI_OUT)
 Copyright 2000 Free Software Foundation, Inc.
 (...)
diff --git a/ekg/abort.h b/ekg/abort.h
index fe41920..9f93419 100644
--- a/ekg/abort.h
+++ b/ekg/abort.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -22,7 +22,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  *
  * The reason for all this is to avoid heap references in fatal signal handlers
  * (which are a big no-no), but still allow plugins to do some rudimentary
- * cleanup.
+ * cleanup. See &amp;lt; at &amp;gt;sa handle_fatal_signal() for more information.
  *
  * Plugins, during initialization, register their abort handlers using
  * ekg2_register_abort_handler().
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -45,6 +45,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; typedef void (*abort_handler)(void);
 /**
  * Statically register the abort &amp;lt; at &amp;gt;a handler function for the &amp;lt; at &amp;gt;a plugin.
  *
+ * The &amp;lt; at &amp;gt;a handler MUST be async-signal-safe (see signal(7)).
+ *
  * &amp;lt; at &amp;gt;return 1 if successful, 0 if there was no space left.
  */
 int ekg2_register_abort_handler(abort_handler handler, plugin_t *plugin);
diff --git a/ekg/configfile.c b/ekg/configfile.c
index 6d4041b..dd57859 100644
--- a/ekg/configfile.c
+++ b/ekg/configfile.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -824,46 +824,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; pass:
 }
 
 /*
- * config_write_crash()
- *
- * funkcja zapisuj&lt;/pre&gt;</description>
    <dc:creator>porridge&lt; at &gt;debian.org</dc:creator>
    <dc:date>2012-01-01T10:55:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1554">
    <title>[PATCH 1/3] Infrastructure for registering and runningabort handlers.</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1554</link>
    <description>&lt;pre&gt;From: Marcin Owsiany &amp;lt;marcin&amp;lt; at &amp;gt;owsiany.pl&amp;gt;

Includes unit tests.
---
 Makefile.am                   |    5 ++-
 ekg/abort.c                   |   72 ++++++++++++++++++++++++++++++++++++++
 ekg/abort.h                   |   77 +++++++++++++++++++++++++++++++++++++++++
 ekg/plugins.c                 |    3 ++
 plugins/check/check.c         |    2 +
 plugins/check/static-aborts.c |   76 ++++++++++++++++++++++++++++++++++++++++
 6 files changed, 234 insertions(+), 1 deletions(-)
 create mode 100644 ekg/abort.c
 create mode 100644 ekg/abort.h
 create mode 100644 plugins/check/static-aborts.c

diff --git a/Makefile.am b/Makefile.am
index bcde301..ba9e0b5 100644
--- a/Makefile.am
+++ b/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -13,6 +13,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bin_PROGRAMS = ekg2
 noinst_HEADERS = \
 ekg2.h \
 ekg2-config.h \
+ekg/abort.h \
 ekg/bindings.h \
 ekg/commands.h \
 ekg/completion.h \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -48,6 +49,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; noinst_HEADERS = \
 ekg2_SOURCES = \
 gettext.h \
 $(noinst_HEADERS) \
+ekg/abort.c \
 ekg/bindings.c \
 ekg/commands.c \
 ekg/completion.c \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -158,7 +160,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; check_LTLIBRARIES = plugins/check/check.la
 plugins_check_check_la_SOURCES = \
 $(noinst_HEADERS) \
 plugins/check/check.c \
-plugins/check/recode.c
+plugins/check/recode.c \
+plugins/check/static-aborts.c
 
 plugins_check_check_la_LDFLAGS = -module -avoid-version -shared -rpath $(abs_top_builddir)/plugins/check
 plugins_check_check_la_CPPFLAGS = $(AM_CPPFLAGS) $(EKG_CPPFLAGS)
diff --git a/ekg/abort.c b/ekg/abort.c
new file mode 100644
index 0000000..2bd3ec5
--- /dev/null
+++ b/ekg/abort.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,72 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*  (C) Copyright 2011 Marcin Owsiany &amp;lt;marcin&amp;lt; at &amp;gt;owsiany.pl&amp;gt;
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License Version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "abort.h"
+#include &amp;lt;stddef.h&amp;gt;
+
+
+#define NUM_ABORT_HANDLERS 10
+
+static struct {
+abort_handler handler;
+plugin_t *plugin;
+} abort_handlers[NUM_ABORT_HANDLERS];
+
+int ekg2_register_abort_handler(abort_handler handler, plugin_t *plugin)
+{
+size_t i;
+for (i = 0; i &amp;lt; NUM_ABORT_HANDLERS; i++) {
+if (! abort_handlers[i].handler) {
+abort_handlers[i].handler = handler;
+abort_handlers[i].plugin = plugin;
+return 1;
+}
+}
+return 0;
+}
+
+void ekg2_run_all_abort_handlers(void)
+{
+size_t i;
+for (i = 0; i &amp;lt; NUM_ABORT_HANDLERS; i++) {
+if (abort_handlers[i].handler) {
+(*abort_handlers[i].handler)();
+}
+}
+}
+
+int ekg2_unregister_abort_handlers_for_plugin(plugin_t *plugin)
+{
+int unregistered_handlers_count = 0;
+size_t i;
+for (i = 0; i &amp;lt; NUM_ABORT_HANDLERS; i++) {
+if (abort_handlers[i].handler &amp;amp;&amp;amp; abort_handlers[i].plugin == plugin) {
+abort_handlers[i].handler = NULL;
+unregistered_handlers_count++;
+}
+}
+return unregistered_handlers_count;
+}
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-file-style: "k&amp;amp;r"
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
+ * End:
+ * vim: noet
+ */
diff --git a/ekg/abort.h b/ekg/abort.h
new file mode 100644
index 0000000..fe41920
--- /dev/null
+++ b/ekg/abort.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,77 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*  (C) Copyright 2011 Marcin Owsiany &amp;lt;marcin&amp;lt; at &amp;gt;owsiany.pl&amp;gt;
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License Version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __EKG_ABORT_H
+#define __EKG_ABORT_H
+
+/**
+ * Statically allocated handlers for fatal signal handling.
+ *
+ * The reason for all this is to avoid heap references in fatal signal handlers
+ * (which are a big no-no), but still allow plugins to do some rudimentary
+ * cleanup.
+ *
+ * Plugins, during initialization, register their abort handlers using
+ * ekg2_register_abort_handler().
+ *
+ * The registered abort handlers will be called by core in cases such as
+ * receiving a SIGSEGV or SIGABRT.
+ *
+ * Core will also unregister all handlers for a given plugin right before
+ * unregistering the plugin itself, but there is no harm in the plugin
+ * unregistering its own abort handlers if it knows of a more appropriate time.
+ */
+
+#include "plugins.h"
+#include &amp;lt;glib.h&amp;gt;
+
+G_BEGIN_DECLS
+
+typedef void (*abort_handler)(void);
+
+/**
+ * Statically register the abort &amp;lt; at &amp;gt;a handler function for the &amp;lt; at &amp;gt;a plugin.
+ *
+ * &amp;lt; at &amp;gt;return 1 if successful, 0 if there was no space left.
+ */
+int ekg2_register_abort_handler(abort_handler handler, plugin_t *plugin);
+
+/**
+ * Run all registered abort handlers (possibly none).
+ *
+ * No particular order of invocation is guaranteed.
+ */
+void ekg2_run_all_abort_handlers(void);
+
+/**
+ * Unregister all abort handlers for &amp;lt; at &amp;gt;a plugin.
+ *
+ * &amp;lt; at &amp;gt;return the number of unregistered handlers.
+ */
+int ekg2_unregister_abort_handlers_for_plugin(plugin_t *plugin);
+
+G_END_DECLS
+
+#endif /* __EKG_ABORT_H */
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-file-style: "k&amp;amp;r"
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ekg/plugins.c b/ekg/plugins.c
index 6498817..870559f 100644
--- a/ekg/plugins.c
+++ b/ekg/plugins.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -28,6 +28,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;errno.h&amp;gt;
 
 #include "objects.h"
+#include "abort.h"
 
 GSList *plugins = NULL;
 /* XXX: not freed anywhere yet */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -386,6 +387,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int plugin_unload(plugin_t *p)
 if (p-&amp;gt;destroy)
 p-&amp;gt;destroy();
 
+ekg2_unregister_abort_handlers_for_plugin(p);
+
 #ifdef SHARED_LIBS
 if (p-&amp;gt;dl)
 ekg2_dlclose(p-&amp;gt;dl);
diff --git a/plugins/check/check.c b/plugins/check/check.c
index e6a8628..b704c0b 100644
--- a/plugins/check/check.c
+++ b/plugins/check/check.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -7,6 +7,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;stdio.h&amp;gt;
 
 void add_recode_tests(void);
+void add_static_aborts_tests(void);
 
 PLUGIN_DEFINE(check, PLUGIN_UI, NULL);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -25,6 +26,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; EXPORT int check_plugin_init(int prio) {
 g_test_init(&amp;amp;argc, &amp;amp;argv, NULL);
 
 add_recode_tests();
+add_static_aborts_tests();
 
 g_test_run();
 ekg_exit();
diff --git a/plugins/check/static-aborts.c b/plugins/check/static-aborts.c
new file mode 100644
index 0000000..cfde530
--- /dev/null
+++ b/plugins/check/static-aborts.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,76 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include "ekg/abort.h"
+#include &amp;lt;glib.h&amp;gt;
+
+static plugin_t p, p2;
+
+static int handler1_called = 0;
+static int handler2_called = 0;
+
+static void handler1(void)
+{
+handler1_called++;
+}
+
+static void handler2(void)
+{
+handler2_called++;
+}
+
+static void reset_counters(void)
+{
+handler1_called = 0;
+handler2_called = 0;
+}
+
+void basics(void) {
+g_assert(! handler1_called);
+g_assert(! handler2_called);
+
+ekg2_run_all_abort_handlers();
+g_assert(! handler1_called);
+g_assert(! handler2_called);
+
+reset_counters();
+g_assert(ekg2_register_abort_handler(handler1, &amp;amp;p));
+ekg2_run_all_abort_handlers();
+g_assert_cmpint(handler1_called, ==, 1);
+g_assert(! handler2_called);
+g_assert_cmpint(ekg2_unregister_abort_handlers_for_plugin(&amp;amp;p), ==, 1);
+}
+
+void interleaved(void) {
+reset_counters();
+g_assert(ekg2_register_abort_handler(handler1, &amp;amp;p2));
+g_assert(ekg2_register_abort_handler(handler1, &amp;amp;p));
+g_assert(ekg2_register_abort_handler(handler2, &amp;amp;p));
+g_assert_cmpint(ekg2_unregister_abort_handlers_for_plugin(&amp;amp;p2), ==, 1);
+g_assert(ekg2_register_abort_handler(handler2, &amp;amp;p));
+ekg2_run_all_abort_handlers();
+g_assert_cmpint(handler1_called, ==, 1);
+g_assert_cmpint(handler2_called, ==, 2);
+g_assert_cmpint(ekg2_unregister_abort_handlers_for_plugin(&amp;amp;p), ==, 3);
+}
+
+void capacity(void) {
+int number_exceeding_abort_handler_capacity = 500;
+int i, capacity = -1;
+
+reset_counters();
+for (i = 1; i &amp;lt;= number_exceeding_abort_handler_capacity; i++) {
+if (! ekg2_register_abort_handler(handler1, &amp;amp;p)) {
+capacity = i - 1;
+break;
+}
+}
+g_assert_cmpint(capacity, &amp;gt;, 0);
+g_assert_cmpint(capacity, &amp;lt;, number_exceeding_abort_handler_capacity);
+ekg2_run_all_abort_handlers();
+g_assert_cmpint(handler1_called, ==, capacity);
+g_assert_cmpint(ekg2_unregister_abort_handlers_for_plugin(&amp;amp;p), ==, capacity);
+}
+
+void add_static_aborts_tests(void) {
+g_test_add_func("/abort/basics", basics);
+g_test_add_func("/abort/capacity", capacity);
+g_test_add_func("/abort/interleaved", interleaved);
+}
&lt;/pre&gt;</description>
    <dc:creator>porridge&lt; at &gt;debian.org</dc:creator>
    <dc:date>2012-01-01T10:54:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1553">
    <title>Fix for #124: Deadlock in fatal signal handler</title>
    <link>http://permalink.gmane.org/gmane.network.jabber.ekg2.devel/1553</link>
    <description>&lt;pre&gt;The following patch series fixes bug#124
http://bugs.ekg2.org/issues/124

It's a little brutal solution, but I think reliably getting a usable corefile
is more useful then unreliably getting your settings saved.
Please review.

[PATCH 1/3] Infrastructure for registering and running abort handlers.
[PATCH 2/3] Helper macro for ignoring results without warnings.
[PATCH 3/3] Make the fatal signal handlers async-signal-safe again.


&lt;/pre&gt;</description>
    <dc:creator>porridge&lt; at &gt;debian.org</dc:creator>
    <dc:date>2012-01-01T10:54:58</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.network.jabber.ekg2.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.network.jabber.ekg2.devel</link>
  </textinput>
</rdf:RDF>

