Creating /proc/<PID>/cmdline requires permissions to communicate with the target process via its signal pipe. If that fails, the output is "<defunct>" which doesn't make sense most of the time. Rather, call format_process_exename in this case to get more useful process name info, albeit not the full cmdline. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin