From baef823cd550449bfbcc36625b9571389d8ad1af Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 13 Sep 2017 09:22:19 +0200 Subject: libio: Add hold/drop iop reference Check iop reference count in close() and return -1 with errno set to EBUSY in case the file descriptor is still in use. Update #3132. --- cpukit/libcsupport/src/fcntl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cpukit/libcsupport/src/fcntl.c') diff --git a/cpukit/libcsupport/src/fcntl.c b/cpukit/libcsupport/src/fcntl.c index a7fcfbc041..ddbf5538f9 100644 --- a/cpukit/libcsupport/src/fcntl.c +++ b/cpukit/libcsupport/src/fcntl.c @@ -213,6 +213,8 @@ static int vfcntl( ret = -1; } } + + rtems_libio_iop_drop( iop ); return ret; } -- cgit v1.2.3