Generally, there is no way. But if you know, there is no user/pid namespaces involved, there is a simple heuristic.