diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2025-01-27 11:01:29 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2025-01-27 11:17:27 +0100 |
commit | b940faa144cae9cd29295d8fdaac163a17f334cc (patch) | |
tree | 80c3d243c42a085ac29fadaf346eb26707d0f4b3 /winsup/cygwin/path.cc | |
parent | df63cbfedd1202b0f404a050358b258662cc0770 (diff) | |
download | newlib-b940faa144cae9cd29295d8fdaac163a17f334cc.zip newlib-b940faa144cae9cd29295d8fdaac163a17f334cc.tar.gz newlib-b940faa144cae9cd29295d8fdaac163a17f334cc.tar.bz2 |
Cygwin: message queues are not devices
Message queues are basically just files and in most cases can be handled
like normal files. So it was a mistake to set the "on-disk-device" flag
for them to fix the mq_unlink() problem reported in
https://cygwin.com/pipermail/cygwin/2025-January/257119.html
Rather, given that unlink() just checks if the object to be deleted
has an on-disk representation, make sure message queues are added to
the path_conv::isondisk() predicate.
This also reverts commit d870655f570f25393dcefbaf0b1dc807f277749c.
Fixes: d870655f570f ("Cygwin: path_conv: set on-disk-device flag for message queue files")
Reported-by: Christian Franke <Christian.Franke@t-online.de>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index c10f2e8..658f3f9 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1273,10 +1273,7 @@ path_conv::check (const char *src, unsigned opt, /* FIXME: bad hack alert!!! We need a better solution */ if (!strncmp (path_copy, MQ_PATH, MQ_LEN) && path_copy[MQ_LEN]) - { - dev.parse (FH_MQUEUE); - dev.setfs (1); - } + dev.parse (FH_MQUEUE); } if (opt & PC_NOFULL) |