Corinna Vinschen 37a046181e Cygwin: ps: show *all* processes in ps -W output
There's a long-standing bug in ps -W.  It only shows processes which ps
can open with PROCESS_QUERY_LIMITED_INFORMATION permissions.  However,
that fails for a lot of system processes. Due to that, output is
basically restricted to processes in the same session, as well as Cygwin
processes... which isn't *quite* what ps -W was supposed to do.

Basically we only need to open the process to fetch the image name.  If
that fails, utilize the undocumented SystemProcessIdInformation info
class introduced with Windows Vista, which allows to fetch the image
name by specifying the PID.  Restructure the code a bit.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-03-12 20:55:29 +01:00
..
2013-11-07 00:19:52 +00:00
2012-11-23 13:22:47 +00:00
2018-12-26 09:24:33 +01:00
2018-06-26 17:20:48 +02:00
2018-01-19 13:19:21 -06:00
2016-08-17 10:58:04 +02:00
2018-12-26 09:24:33 +01:00
2016-10-23 17:16:30 +02:00