Skip to content
Snippets Groups Projects
Commit e5bd3780 authored by Fabien Meghazi's avatar Fabien Meghazi
Browse files

[FIX] server: prevent inotify watches leak

Before this commit the PyInotify filesystem watcher used by the code
autoreload feature (`--dev=reload`) would not get a chance to free
it's inotify watches before the reexec, hence at each reexec triggered
by a code reload the inotify watches where accumulated until potentially
reaching the kernel limit `fs.inotify.max_user_watches`.

This patch ensures that inotify properly closes it's file descriptor
before we reexec:
https://github.com/dsoprea/PyInotify/blob/f77596a/inotify/adapters.py#L79



closes odoo/odoo#71284

X-original-commit: 8703ff1e
Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
parent 79d3cf45
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment