osaf/services/saf/logsv/lgs/lgs_filehdl.c | 4 ---- osaf/services/saf/logsv/lgs/lgs_stream.c | 2 +- 2 files changed, 1 insertions(+), 5 deletions(-)
In case of close(), the first thing Linux does is deallocate the file descriptor; then it starts flushing pending written data. If this process is interrupted, it will return EINTR, but the file descriptor itself is already deallocated, and may have been reused long before close() returned. Hence it is not required to retry close(). diff --git a/osaf/services/saf/logsv/lgs/lgs_filehdl.c b/osaf/services/saf/logsv/lgs/lgs_filehdl.c --- a/osaf/services/saf/logsv/lgs/lgs_filehdl.c +++ b/osaf/services/saf/logsv/lgs/lgs_filehdl.c @@ -482,12 +482,8 @@ int fileclose_hdl(void *indata, void *ou fd = *(char *) indata; TRACE_ENTER2("fd=%d", fd); -close_retry: rc = close(fd); - if (rc == -1 && errno == EINTR) - goto close_retry; - if (rc == -1) { LOG_ER("fileclose() %s",strerror(errno)); } diff --git a/osaf/services/saf/logsv/lgs/lgs_stream.c b/osaf/services/saf/logsv/lgs/lgs_stream.c --- a/osaf/services/saf/logsv/lgs/lgs_stream.c +++ b/osaf/services/saf/logsv/lgs/lgs_stream.c @@ -105,7 +105,7 @@ static int fileclose_h(int fd) lgsf_retcode_t api_rc; int rc = 0; - TRACE_ENTER(); + TRACE_ENTER2("fd=%d", fd); /* Fill in API structure */ apipar.req_code_in = LGSF_FILECLOSE; ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel