Issue:
Describe the bug
When using find_process to locate a process, the returned Process object contains an incorrect start_time value. This causes is_process_alive to always return False for that object, even though the process is running.
To Reproduce
from libmem import *
proc1 = find_process("notepad.exe")
proc2 = get_process_ex(proc1.pid)
print(f"proc1.start_time = {proc1.start_time}")
print(f"proc2.start_time = {proc2.start_time}")
print(f"is_process_alive(proc1) = {is_process_alive(proc1)}")
print(f"is_process_alive(proc2) = {is_process_alive(proc2)}")
Output:
text
proc1.start_time = 28133258
proc2.start_time = 29584828
is_process_alive(proc1) = False
is_process_alive(proc2) = True
Expected behavior
find_process should populate the start_time field correctly, and is_process_alive should return True for the returned process object.
Environment
OS: Windows 11
Python: 3.12
libmem: 5.1.4 (from PyPI)
Additional context
This issue occurs with any process, not just specific ones. The get_process_ex function works correctly and can be used as a workaround by calling it with the PID from find_process.
Issue:
Describe the bug
When using
find_processto locate a process, the returnedProcessobject contains an incorrectstart_timevalue. This causesis_process_aliveto always returnFalsefor that object, even though the process is running.To Reproduce