Cygwin: proc: return more useful cmdline
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 commit is contained in:
		| @@ -519,12 +519,9 @@ format_process_cmdline (void *data, char *&destbuf) | ||||
|       destbuf = NULL; | ||||
|     } | ||||
|   destbuf = p ? p->cmdline (fs) : NULL; | ||||
|   if (!destbuf || !*destbuf) | ||||
|     { | ||||
|       destbuf = cstrdup ("<defunct>"); | ||||
|       fs = strlen (destbuf) + 1; | ||||
|     } | ||||
|   return fs; | ||||
|   if (destbuf && *destbuf) | ||||
|     return fs; | ||||
|   return format_process_exename (data, destbuf); | ||||
| } | ||||
|  | ||||
| static off_t | ||||
|   | ||||
		Reference in New Issue
	
	Block a user