You check the stacktrace of the background process and see which function got called. How you do that depends on the implementation. If you have some handle to the called function, you can check that against the current definition. Functions are 'objects' and you can compare them for identity. In real implementations there also will be some id.