projects
/
enjoyable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove website, now in yukkurigames.com repository.
[enjoyable.git]
/
Categories
/
NSProcessInfo+Debugging.m
diff --git
a/Categories/NSProcessInfo+Debugging.m
b/Categories/NSProcessInfo+Debugging.m
index
649de3b
..
1356ae7
100644
(file)
--- a/
Categories/NSProcessInfo+Debugging.m
+++ b/
Categories/NSProcessInfo+Debugging.m
@@
-17,6
+17,7
@@
@implementation NSProcessInfo (Debugging)
- (BOOL)isBeingDebugged {
@implementation NSProcessInfo (Debugging)
- (BOOL)isBeingDebugged {
+#ifdef DEBUG
int mib[4];
struct kinfo_proc info;
size_t size = sizeof(info);
int mib[4];
struct kinfo_proc info;
size_t size = sizeof(info);
@@
-30,6
+31,9
@@
return sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0) == 0
&& (info.kp_proc.p_flag & P_TRACED) != 0;
return sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0) == 0
&& (info.kp_proc.p_flag & P_TRACED) != 0;
+#else
+ return NO;
+#endif
}
@end
}
@end