sysctl and Rosetta translation

Hello everywhere,

I have an app from which I am trying to find out if a certain other running application is translated with Rosetta.
What I am basically trying is
Code Block    
var mib: [Int32] = [CTL_KERN, KERN_PROC, KERN_PROC_PID, id]
    let length = 4
var size = MemoryLayout<kinfo_proc>.stride
    let result = sysctl(&mib, u_int(length), &info, &size, nil, 0)


Where ID is the PID from this other application. I get this ID from the current running application.

Unfortunately every time when I try to check if that application is translated I get a false even when it is.

For example this here is always false
Code Block
P_TRANSLATED == (P_TRANSLATED & info.kp_proc.p_flag)


My application is native, and I want to check if another running process(application) is translated.

Any suggestions?



sysctl and Rosetta translation
 
 
Q