From 6d9275e41222b8cdb2b032d6e220be0d18549c8b Mon Sep 17 00:00:00 2001 From: Wayne Zhang Date: Wed, 8 Dec 2021 15:29:34 -0500 Subject: [PATCH] uv: register __rfim_event 156 as UV_RENAME (#3540 3/3) When the watched file is moved or removed, or an editor (e.g. vim) renames then creates the file, the __rfim_event 156 occurs. This is an undocumented event that should not happen, but register it as UV_RENAME for now since it is functionally equivalent. Co-authored-by: Gaby Baghdadi --- src/unix/os390.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/unix/os390.c b/src/unix/os390.c index 62b42708..6911ea7f 100644 --- a/src/unix/os390.c +++ b/src/unix/os390.c @@ -648,6 +648,14 @@ static int os390_message_queue_handler(uv__os390_epoll* ep) { events = UV_CHANGE; else if (msg.__rfim_event == _RFIM_RENAME || msg.__rfim_event == _RFIM_UNLINK) events = UV_RENAME; + else if (msg.__rfim_event == 156) + /* TODO(gabylb): zos - this event should not happen, need to investigate. + * + * This event seems to occur when the watched file is [re]moved, or an + * editor (like vim) renames then creates the file on save (for vim, that's + * when backupcopy=no|auto). + */ + events = UV_RENAME; else /* Some event that we are not interested in. */ return 0;