Deutsch English Français Italiano |
<vpi4i1$16dip$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Muttley@DastardlyHQ.org Newsgroups: comp.unix.programmer Subject: Re: signalfd() Date: Mon, 24 Feb 2025 15:51:29 -0000 (UTC) Organization: A noiseless patient Spider Lines: 20 Message-ID: <vpi4i1$16dip$1@dont-email.me> References: <vphfec$1158f$1@dont-email.me> <8d%uP.1396190$21T3.1322102@fx18.iad> Injection-Date: Mon, 24 Feb 2025 16:51:29 +0100 (CET) Injection-Info: dont-email.me; posting-host="3ed9be7f7afd79dbf1de2887ac21fc07"; logging-data="1259097"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/b1TUCT0janfwgrP5lzJJl" Cancel-Lock: sha1:yC+b9uTotjHYr7+26tq07BHB1HM= Bytes: 1634 On Mon, 24 Feb 2025 14:18:44 GMT scott@slp53.sl.home (Scott Lurndal) wibbled: >Muttley@DastardlyHQ.org writes: >>Hi >> >>I've been playing around with signalfd() on linux and it seems to work but >>there also seems to be zero information other than the signal number in the >>signalfd_siginfo structure returned from a read(). >> >>Where I'd expect PID and UID to be set as in reception of a signal handler >>set using sigaction with the siginfo_t passed to the handler, the below code >>returns 0 for everything in the signalfd_siginfo structure. > >I wonder if you still need to call sigaction with SA_SIGINFO before >using signalfd? Actually my mistake - the pid and uid are only zerop when it receives a signal from the terminal but when another process sends it it works ok. Thanks for the idea though.