← Back to context

Comment by jjoonathan

3 years ago

Yeah, this is a good resource! One time I needed to printf-sprinkle dyld in order to figure out why our app was dying on a security update... it turned out to be an installer setting a sticky bit and the security update silently ignoring libraries if any containing folder had a sticky bit set.

Anyway, since the source code has been up for a while, and since HN has GPT fever at the moment, the question naturally arises... can ChatGPT get this one?

    The "lsof" tool on Mac OS X uses the "kernal control" API to obtain a list of
    open ports. This API allows access to various kernel resources, including
    network sockets, and provides information about the state of the system. The
    "lsof" command uses this API to list all open files, including network sockets,
    and displays information about the processes that are using them.

It looks confidently wrong in this case, unless "kernal control" is a real name for the part of the XNU API containing proc_pidinfo.