Loading modules for other processes can fail under some linux sandboxing rules but that doesn't mean
we should not be able to compute the process name. So when module == NULL, we make module loading non-fatal.
pname = g_strdup (process_handle->pname);
mods = mono_w32process_get_modules (pid);
- if (!mods) {
+ if (!mods && module != NULL) {
+ mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Can't get modules %p", __func__, process);
g_free (pname);
return 0;
}