comparison dep/animone/src/fd/bsd.cc @ 337:a7d4e5107531

dep/animone: REFACTOR ALL THE THINGS 1: animone now has its own syntax divergent from anisthesia, making different platforms actually have their own sections 2: process names in animone are now called `comm' (this will probably break things). this is what its called in bsd/linux so I'm just going to use it everywhere 3: the X11 code now checks for the existence of a UTF-8 window title and passes it if available 4: ANYTHING THATS NOT LINUX IS 100% UNTESTED AND CAN AND WILL BREAK! I still actually need to test the bsd code. to be honest I'm probably going to move all of the bsds into separate files because they're all essentially different operating systems at this point
author Paper <paper@paper.us.eu.org>
date Wed, 19 Jun 2024 12:51:15 -0400
parents a4257370de16
children
comparison
equal deleted inserted replaced
336:d260549151d6 337:a7d4e5107531
91 kvm_close(kernel); 91 kvm_close(kernel);
92 return false; 92 return false;
93 } 93 }
94 94
95 for (int i = 0; i < entries; i++) { 95 for (int i = 0; i < entries; i++) {
96 if (!process_proc({kinfo[i].ki_paddr->p_pid, Basename(kinfo[i].ki_paddr->p_comm)})) { 96 if (!process_proc({.platform = ExecutablePlatform::Posix, .pid = kinfo[i].ki_paddr->p_pid, .comm = Basename(kinfo[i].ki_paddr->p_comm)})) {
97 kvm_close(kernel); 97 kvm_close(kernel);
98 return false; 98 return false;
99 } 99 }
100 } 100 }
101 101
121 121
122 if (length < sizeof(struct kinfo_proc)) 122 if (length < sizeof(struct kinfo_proc))
123 return false; 123 return false;
124 124
125 for (int i = 0; i < length / sizeof(result[0]); i++) 125 for (int i = 0; i < length / sizeof(result[0]); i++)
126 if (!process_proc({result[i].ki_pid, result[i].ki_comm})) 126 if (!process_proc({.platform = ExecutablePlatform::Posix, .pid = result[i].ki_pid, .comm = result[i].ki_comm}))
127 return false; 127 return false;
128 128
129 return true; 129 return true;
130 #endif 130 #endif
131 } 131 }