[metadata]
id = "CON39-C"
type = "rule"
category = "CON"
number = 39
title = "Do not join or detach a thread that was previously joined or detached"
description = """
The C Standard, 7.28.5.6 paragraph 2 [ISO/IEC 9899:2024], states that a thread
shall not be joined once it was previously joined or detached. Similarly,
subclause 7.28.5.3 paragraph 2 [ISO/IEC 9899:2024], states that a thread shall
not be detached once it was previously joined or detached. Violating either of
these subclauses results inundefined behavior 211.
"""
severity = "Low"
likelihood = "Likely"
priority = "P3"
level = "L3"
cert_version = "2016 Edition (Wiki)"
last_modified = "Oct 31, 2025"
[rules.cert_c.CON39-C]
enabled = true
[references]
wiki = "https://wiki.sei.cmu.edu/confluence/display/c/CON39-C.+Do+not+join+or+detach+a+thread+that+was+previously+joined+or+detached"