[SERVER-28836] check waitpid() return status Created: 18/Apr/17  Updated: 30/Oct/23  Resolved: 17/Nov/17

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.7.1

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: neweng, platforms-interns-2017
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2017-10-23, Platforms 2017-11-13, Platforms 2017-12-04
Participants:

 Description   

In initialize_server_global_state.cpp, there are two calls to waitpid() that do not check to see if it returned an error before looking at the returned process status. waitpid() can possibly return -1 and set errno to ECHILD, which would invalidate the process status. (These problems were flagged by Coverity.)



 Comments   
Comment by Githook User [ 17/Nov/17 ]

Author:

{'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}

Message: SERVER-28836 examine waitpid return values
Branch: master
https://github.com/mongodb/mongo/commit/2057dbd48f4d66b389203004d1cb021c3bad2f77

Generated at Thu Feb 08 04:19:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.