9#ifndef LLDB_HOST_POSIXSPAWNRESPONSIBLE_H
10#define LLDB_HOST_POSIXSPAWNRESPONSIBLE_H
14#if __has_include(<responsibility.h>)
15#include <dispatch/dispatch.h>
17#include <responsibility.h>
21errno_t responsibility_spawnattrs_setdisclaim(posix_spawnattr_t *attrs,
27 if (@available(macOS 10.14, *)) {
28#if __has_include(<responsibility.h>)
29 static __typeof__(responsibility_spawnattrs_setdisclaim)
30 *responsibility_spawnattrs_setdisclaim_ptr;
31 static dispatch_once_t pred;
32 dispatch_once(&pred, ^{
33 responsibility_spawnattrs_setdisclaim_ptr =
34 reinterpret_cast<__typeof__(&responsibility_spawnattrs_setdisclaim)
>
35 (dlsym(RTLD_DEFAULT,
"responsibility_spawnattrs_setdisclaim"));
37 if (responsibility_spawnattrs_setdisclaim_ptr)
38 return responsibility_spawnattrs_setdisclaim_ptr(attr,
true);
static int setup_posix_spawn_responsible_flag(posix_spawnattr_t *attr)