Darwin is the open-source core of macOS, iOS, tvOS and watchOS. It is derived from NeXTStep, Mach, and *BSD; the kernel is called XNU.
Questions tagged [darwin]
367 questions
15
votes
5 answers
Determine Process Info Programmatically in Darwin/OSX
I have a class with the following member functions:
/// caller pid
virtual pid_t Pid() const = 0;
/// physical memory size in KB
virtual uint64_t Size() const = 0;
/// resident memory for this process
virtual uint64_t Rss() const = 0;
///…

anemitz
- 153
- 1
- 1
- 5
14
votes
3 answers
arc4random() and arc4random_uniform() not really random?
I have been using arc4random() and arc4random_uniform() and I always had the feeling that they wasn't exactly random, for example, I was randomly choosing values from an Array but often the values that came out were the same when I generated them…

Pop Flamingo
- 3,023
- 2
- 26
- 64
14
votes
2 answers
How to properly use CFNotificationCenterAddObserver in Swift for iOS
Pulling my hair out getting CFNotificationCenterAddObserver to work in Swift.
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(),
UnsafePointer(self),
iosLocked,
…

zooster
- 352
- 3
- 8
13
votes
3 answers
Getting suddenly a lot of request from CFNetwork/Darwin
I've noticed in the AWS console that our website got a lot of more requests than normally. Especially in the night hours (Europe time).
Then I've checked the nginx logs and now I know that a lot of devices with different IP addresses request the…

Vincent Hoch-Drei
- 603
- 2
- 7
- 21
11
votes
2 answers
How can I install a DYLD loader command that is not explicitly supported by ld?
On Mac OS X, binary executables in the DYLD format contain "loader commands" that instruct the library loading system how to handle the contents of the file. In particular, the loader command instruct the system where dependent libraries should be…

danielpunkass
- 17,527
- 4
- 24
- 38
11
votes
1 answer
Mac OSX file permissions has '@' - how to remove that '@'
How can I remove that '@' character from the file permissions?
'@' in file permissions for Mac/OSX machines, is used to show that an extended attribute is set with this file.
Tried chmod 755 galaxy-ansible.yml but that didn't help.
Tried echo…

AKS
- 16,482
- 43
- 166
- 258
11
votes
4 answers
How to REALLY strip a binary in MacOs
MacOs 10.6, if I have a file "unwanted.c" which contains:
class secret_thing {
public:
secret_thing() {}
void revealing_method_name() {}
};
main()
{
secret_thing obj;
obj.revealing_method_name();
}
Now I do:
$ g++ unwanted.c -o unwanted
$…

mtoy
- 583
- 1
- 5
- 13
10
votes
2 answers
passing compiler flags to boost libraries (such as Thread) which require compilation
So I know that the boost libraries are primarily header-only but there are a few which require compilation, for example Boost.Thread. In Darwin, how do I compile these and pass the -m32 flag so they can be compiled into a 32-bit (i386) binary? …

eeeeaaii
- 3,372
- 5
- 30
- 36
10
votes
1 answer
Darwin/Reference Manual Pages Missing
FOREWORD: This question is in regards to essential manpages that have seemingly disappeared from the internet. This is not a request to recommend or find a book, tool, software library, tutorial or other off-site resource.
Apple has either…

l'L'l
- 44,951
- 10
- 95
- 146
9
votes
3 answers
Prisma query engine not found on mac M1
I'm having an issue with running Prisma in my project. Running npx prisma generate works, but then running my app I get:
/Users/user/Desktop/project/node_modules/@prisma/client/runtime/index.js:36466
4:29:05 PM web.1 | throw new…

mcw
- 465
- 1
- 4
- 14
9
votes
0 answers
How do I update libc and libstdc++ on OS X 10.5?
I am using a Mac Mini as a build agent and I need to upgrade the standard libraries. I can't find either libc or libstdc++ on MacPorts.

Matt Chambers
- 2,229
- 1
- 25
- 43
9
votes
3 answers
How to enable large file support under Darwin?
I have a C application I am trying to compile for Mac OS X 10.6.4:
$ uname -v
Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386
My gcc is as follows:
$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC)…

Alex Reynolds
- 95,983
- 54
- 240
- 345
8
votes
1 answer
What is the Non UI role in crash reports
When analysing crash reports, I'm seeing a Non UI role that I have never seen before. I am trying to understand what state of the app it corresponds to.
Hardware Model: iPhone7,2
Code Type: ARM-64 (Native)
Role: Non…

deadbeef
- 5,409
- 2
- 17
- 47
8
votes
1 answer
Mac low-level keyboard device corresponding to Linux /dev/input?
What is the name of the low-level keyboard device in macOS (somewhere in Darwin / Mach / IOKit) that corresponds to /dev/input in Linux? (e.g. /dev/input/event0)
Context: I'm asking because want to 'map' the Mac device to a Docker container running…

David J.
- 31,569
- 22
- 122
- 174
8
votes
2 answers
can't find swift darwin documentation
I'm playing around with swift and have the following simple code
I want to check how "sqrt" function is implemented, so I tried to click on "Darwin.C.math" link but nothing happened. I googled "Swift darwin apple documentation" but nothing about…

Thor
- 9,638
- 15
- 62
- 137