summaryrefslogtreecommitdiff
path: root/.topmsg
blob: 431bbab6239468ce4f60ef993a765c7eeca64ab0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: Jeremie Koenig <jk@jk.fr.eu.org>
Subject: [PATCH] implement SA_SIGINFO signal handlers.

    52baaca Hurd signals: Copy bits/sigaction.h
    4232c66 Hurd signals: SA_SIGINFO support
    1831cfe Hurd signals: Use POSIX sigcodes

XXX: we need to sort out d.code vs d.exc_code vs siginfo.si_code:

- d.code is meant to contain the signal code as passed in the
  msg_sig_post RPC, and used for filtering preemptors such as
  setitimer's.
- other preemptors want to filter against the address of the fault
- siginfo.si_code is meant to contain the POSIX code.

Possibly we should add fields to hurd_signal_detail to avoid mixing
things, and easily get what we want where we want: exception2signal
would indeed provides the posix values, but e.g. in separate fields, and
the sa_siginfo code would be able to pick it up from there, while the
legacy code would be able to easily continue using the same values as
before.

Notably, the

         if (detail->exc)
           {
             int nsigno;
             _hurd_exception2signal_legacy (detail, &nsigno);
             assert (nsigno == signo);
           }
         else
           detail->code = 0;

piece looks wrong: previously we did not set the code to 0.

Note: the proc server also calls _hurd_exception2signal, and this
changeset changes its behavior, that needs to be double-checked.