
...
Because race conditions in code are extremely hard to find, this problem might not appear during standard debugging stages of development. However, depending on what file is being read and how important the order of read operations is, this problem can be particular dangerous.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
---|---|---|---|---|---|---|
POS38-C | Medium | mediumUnlikely | unlikelyNo | mediumNo | P4P2 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
CodeSonar |
| BADFUNC.FORK | Use of fork | ||||||
Helix QAC |
| DF4951, DF4952 | |||||||
Parasoft C/C++test |
| CERT_C-POS38-a | Avoid race conditions when using fork and file descriptors | ||||||
| CERT C: Rule POS38-C | Checks for file descriptor exposure to child process (rule fully covered) |
...