[SERVER-18876] Coverity analysis defect 49646: Unchecked return value Created: 08/Jun/15  Updated: 25/Jan/17  Resolved: 08/Jun/15

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.1.5

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: RPL 5 06/26/16
Participants:

 Description   

Value returned from a function is not checked for errors before being used

Defect 49646 (STATIC_C)
Checker CHECKED_RETURN (subcategory none)
File: /src/mongo/db/storage/storage_engine_lock_file_posix.cpp
Function mongo::StorageEngineLockFile::writePid()
/src/mongo/db/storage/storage_engine_lock_file_posix.cpp, line: 164
Calling "fsync" without checking return value (as is done elsewhere 5 out of 7 times).

            ::fsync(_lockFileHandle->_fd);



 Comments   
Comment by Githook User [ 08/Jun/15 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-18876 server should not start up if fsync fails on lock file
Branch: master
https://github.com/mongodb/mongo/commit/d7902c7d026c5656b234319e6cb6152574ecab3f

Generated at Thu Feb 08 03:49:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.