Deutsch   English   Français   Italiano  
<vpiknf$1eak4$6@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: Lawrence D'Oliveiro <ldo@nz.invalid>
Newsgroups: comp.unix.programmer
Subject: Re: signalfd()
Date: Mon, 24 Feb 2025 20:27:27 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <vpiknf$1eak4$6@dont-email.me>
References: <vphfec$1158f$1@dont-email.me>
	<8d%uP.1396190$21T3.1322102@fx18.iad> <vpi4i1$16dip$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 24 Feb 2025 21:27:27 +0100 (CET)
Injection-Info: dont-email.me; posting-host="514b9375f3f626cad6324c9c7e91e06f";
	logging-data="1518212"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX181+xKgSaP6arULaWlv10kg"
User-Agent: Pan/0.162 (Pokrosvk)
Cancel-Lock: sha1:2Ejvzh7w9IB5PEFzEv4jgRcA5HM=
Bytes: 1763

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>.