Skip to content

Why force set_inheritable()? #345

@Vbrawl

Description

@Vbrawl

Hi, I am making a python program that's supposed to have an auto-update feature, after updating I need to call execv to start the new process, in the new process I am trying to again create a new socket at the same address/port and because the set_inheritable is forced I get an EADDRINUSE error.

The reason is probably zero downtime?

In my case I believe it gets too complex to get the inherited sockets and put them where they need to go so I was wondering if there is a way to simply stop the inherited sockets altogether?

Is there a reason they are forced? Why not put them behind some config option the end user can toggle?

I am specifically referring to the src/hypercorn/config.py file in the end of Config._create_sockets() function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions