Matt,
I’d actually provided my response because I’ve never tried to key
anything off the process termination notification - and I honestly
didn’t want to get sucked into when that notification was being sent
(and if he’s seeing I/O AFTER that point, then it must be sent prior to
the last thread exit.)
I do know the semantics of a signaled process object (it’s the LAST
thing that the LAST thread does before it places itself on the thread
reaper list. Been that way since NT 3.1, in fact.) Hence, why I
suggested this as an alternative - I know how it works, and I know that
the only I/O after this point would have to come from abandoned IRPs.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of MM
Sent: Friday, June 09, 2006 8:31 AM
To: ntfsd redirect
Subject: Re: [ntfsd] Irps remaining corresponding to terminated process
Tony,
When the PsSetCreateProcessNotifyRoutine terminate callback is called,
what all still exist at that point? Surly the FCB, but what about FO’s.
If a process object exist, then file objects should still exist? So
clean-up and close happen after the terminate callback is called?
As I stated when responding to the OP, I was “just shooting from the
hip”. How far off are my assumptions?
m
Tony Mason wrote:
Wait for the process object itself to be signaled (at which point all
of the threads are terminated, which means all of the I/O has either
been canceled or abandoned.) You can do this by calling
KeWaitForSingleObject with the process object.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
*From:* xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] *On Behalf Of *Rohit
*Sent:* Friday, June 09, 2006 7:32 AM
*To:* ntfsd redirect
*Subject:* [ntfsd] Irps remaining corresponding to terminated process
problem is
I am using filespy as the base code and doing modifications above that
code. Now i have registered a callback using
*PsSetLoadImageNotifyRoutine . When ever any process is* created in
the system, this callbach gets called and i made an entry of process
id and process name in an hash maintained by me. Now whenever any irp
or fast io comes then using the *PsGetCurrentProcessId *and resolving
process id to process name using hash and used this process name for
logging. I remove the process id and process name entry fro the hash
when the process corresponding to pid terminate .For getting that
notification i have registered another callback using
*PsSetCreateProcessNotifyRoutine. *Now the problem is suppose some
process is terminated, i got this notification and removed the entry
from hash , There are still some irps reminaing to be processed
corresponding to this process. So for some irps i donot get process
name .
What i need to do for resolving this problem
Regards
Rohit
— Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17 You are currently
subscribed to ntfsd as: xxxxx@osr.com To unsubscribe send a blank
email to xxxxx@lists.osr.com
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag
argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com