How can you determine which process a temp file belongs to? If you kill the process will the temp file also be deleted?

Thanks