On Sun, 4 Aug 2024 14:39:21 +0100 Pedro Falcato wrote: > To me it looks like the best way to implement these two functions is > to create a table of some sorts (indexed by signal, so array[SIGINT] = > "INT") and then use it. > str2sig would just iterate the whole array with strcmps, which is a > _little_ slow but this is probably not performance critical anyway. > > Special casing would be required for RT signals, but that's no biggie. > What do you think? I was thinking the same thing for the sake of size. There are a few more special cases though as some signal names refer to the same signal numbers.