Sujet : Re: signalfd()
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.unix.programmerDate : 24. Feb 2025, 21:27:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vpiknf$1eak4$6@dont-email.me>
References : 1 2 3
User-Agent : Pan/0.162 (Pokrosvk)
On Mon, 24 Feb 2025 15:51:29 -0000 (UTC), Muttley wrote:
... the pid and uid are only zerop when it receives a
signal from the terminal but when another process sends it it works ok.
Just confirmed that with the following test program:
import asyncio
import linuxproc as lxp
from linuxproc import \
SIG, \
SigProcMask, \
SignalFile
async def main() :
to_block = SigProcMask({SIG.TERM, SIG.INT})
notif = SignalFile.create(to_block)
to_block.apply_replace()
while True :
evt = await notif.get_next_async(timeout = 1)
print(evt)
#end while
#end main
asyncio.run(main())
using my Python wrappers at <
https://gitlab.com/ldo/python_linuxfs>.