From b6f53617a7512082abb7e249d93cbbbe02f19255 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 15 Jan 2019 21:49:52 +0100 Subject: [PATCH] Cygwin: signalfd: set st_mode in fhandler_signalfd::fstat Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler.cc | 3 --- winsup/cygwin/fhandler_signalfd.cc | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 2c1fcb7db..9643373b0 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1345,9 +1345,6 @@ fhandler_base::fstat (struct stat *buf) case FH_PIPER: buf->st_mode = S_IFIFO | S_IRUSR; break; - case FH_SIGNALFD: - buf->st_mode = S_IRUSR | S_IWUSR; - break; default: buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH; break; diff --git a/winsup/cygwin/fhandler_signalfd.cc b/winsup/cygwin/fhandler_signalfd.cc index 24cf403b6..d8e17a8fc 100644 --- a/winsup/cygwin/fhandler_signalfd.cc +++ b/winsup/cygwin/fhandler_signalfd.cc @@ -59,6 +59,7 @@ fhandler_signalfd::fstat (struct stat *buf) int ret = fhandler_base::fstat (buf); if (!ret) { + buf->st_mode = S_IRUSR | S_IWUSR; buf->st_dev = FH_SIGNALFD; buf->st_ino = get_unique_id (); }