• Python 3.9 pidfd_open

    From Weatherby,Gerard@21:1/5 to All on Tue Jul 5 18:47:45 2022
    cHl0aG9uIGludHJvZHVjZWQgb3MucGlkZmRfb3BlbigpLCB3aGljaCB3b3JrcyBhcyBkb2N1bWVu dGVkLg0KDQpNeSBkZXZlbG9wbWVudCBlbnZpcm9ubWVudCwgUHlDaGFybSwgY29tcGxhaW5zIGFi b3V0IGl0IGJlaW5nIHVuZGVmaW5lZC4NCg0KU2hvdWxkIGl0IGJlIGluIGh0dHBzOi8vcmF3Lmdp dGh1YnVzZXJjb250ZW50LmNvbS9weXRob24vY3B5dGhvbi8zLjkvTGliL29zLnB5ID8NCg0KLS0N CkdlcmFyZCBXZWF0aGVyYnkgfCBBcHBsaWNhdGlvbiBBcmNoaXRlY3QNCk5NUmJveCB8IE5BTiB8 IERlcGFydG1lbnQgb2YgTW9sZWN1bGFyIEJpb2xvZ3kgYW5kIEJpb3BoeXNpY3MgfCBVQ29ubiBI ZWFsdGgNCjI2MyBGYXJtaW5ndG9uIEF2ZW51ZSwgRmFybWluZ3RvbiwgQ1QgMDYwMzAtNjQwNg0K dWNoYy5lZHU8aHR0cDovL3VjaGMuZWR1Pg0K

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Barry Scott@21:1/5 to All on Fri Jul 8 16:21:00 2022
    On 5 Jul 2022, at 19:47, Weatherby,Gerard <gweatherby@uchc.edu> wrote:

    python introduced os.pidfd_open(), which works as documented.

    My development environment, PyCharm, complains about it being undefined.

    Should it be in https://raw.githubusercontent.com/python/cpython/3.9/Lib/os.py ?

    When faced with this type of problem I introspect from the Python REPL prompt.

    Run python 3.9 and see if os.pidfd_open is defined?

    Do not do this inside PyCharm to rule out a problem with PyCharm.

    Also you will need to be running a linux kernel + glibc version that is new enough to proved this to python.

    This is what I see with Fedora 36:

    $ python3.9
    Python 3.9.13 (main, Jun 9 2022, 00:00:00)
    [GCC 12.1.1 20220507 (Red Hat 12.1.1-1)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    import os
    os.pidfd_open
    <built-in function pidfd_open>


    Barry



    --
    Gerard Weatherby | Application Architect
    NMRbox | NAN | Department of Molecular Biology and Biophysics | UConn Health 263 Farmington Avenue, Farmington, CT 06030-6406
    uchc.edu<http://uchc.edu>
    --
    https://mail.python.org/mailman/listinfo/python-list


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)