Closed 21pages closed 3 months ago
I see at least 3 gedit
processes from ps
. Interestingly enough, the 158332
and 158334
PIDs are not listed by sysinfo
either.
Only one gedit
exists, ps
only list one, sysinfo
list others
Nope, there are \n
characters, so definitely not one. Use println!("output: {}", String::from_utf8(output.stdout).unwrap())
instead.
Oh so it was listing grep
and ps
. I see.
Take a look at /proc/[PID]
for each of them. My guess here is that some of them are subprocesses.
not exist in /proc/
, it's easy to reproduce.
And in /proc/[PID]/task/[sub PID]
?
Also, what is htop
displaying?
Multi gedit in htop
, seems the same as 0.31, but version 0.29 give one pid, same as ps
So maybe check Process::thread_kind()
? I should maybe add a Process::is_task
method though...
Filter thread_kind
seems work.
This is the first time I've heard of subprocesses, I think most people just use the main process.
Well, computers are complicated. :)
version: 0.31.2