1751911 Members
4805 Online
108783 Solutions
New Discussion юеВ

Re: SYS$FORCEX Query

 
SOLVED
Go to solution
AlanW
Occasional Contributor

SYS$FORCEX Query

The System Services documentation on $FORCEX states the following:

"The $FORCEX service completes successfully if a force exit request is already in effect for the target process but the exit is not yet completed."

Can anyone clarify what this means?

If you issue a $FORCEX on a process that already has a force exit request in effect, does this mean that the target process will exit immediately ?

Or does this mean that $FORCEX will just return a 'success' status, but will not actually try to force the target process to exit ?

I hope I'm making sense here. I did trawl for any previous queries on this, but couldn't see anything. Do shout if you need me to clarify on anything here.


(Documentation Source:)
http://h71000.www7.hp.com/doc/83final/4527/4527pro_050.html
5 REPLIES 5
Volker Halle
Honored Contributor
Solution

Re: SYS$FORCEX Query

Alan,

if the PCB$V_FORCPEN bit is set in PCB$L_STS of the target process, $FORCEX will just return SS$_NORMAL without attempting to queue another AST to the target process to request image exit. The image in the target process will eventually exit.

If the target process has the PCB$V_NODELET bit set, $FORCEX will also just return as above.

Reference: [SYS]SYSFORCEX

Volker.

Hoff
Honored Contributor

Re: SYS$FORCEX Query

Inferring much, and given that few folks typically see this sequencing outside of a case of a wedged process or maybe a degenerate rundown handler sequence within an application, can you post some details around the target process and its state? If this target process is stuck in a resource wait for instance, repeated $forcex calls won't necessarily cause it to complete its rundown processing.
Richard J Maher
Trusted Contributor

Re: SYS$FORCEX Query

Hi Alan,

It will just return success. As Volker pointed out, you can check to see if there is a forced-exit pending or you can escalate to a $delprc if that is appropriate.

Do you have a specific problem or requirement in mind?

Cheers Richard Maher

PS. IIRC $forcex needs to deliver a USER mode AST to the target process. If the process is already in an AST or in an inner-mode then any action will be delayed.
Stanley F Quayle
Valued Contributor

Re: SYS$FORCEX Query

And $DELPRC might not make the process go away, but enter the RWAST state. There are numerous postings about this issue here in ITRC.

[Just so we don't discuss this all again. Perhaps the RWAST state is itself in RWAST...]
http://www.stanq.com/charon-vax.html
AlanW
Occasional Contributor

Re: SYS$FORCEX Query

Thanks for all the responses folks, this certainly clears up some ambiguity surrounding the comment in the HP documentation.

I won't go into specifics, but essentially knowing what happens when you issue a 2nd $forcex on a target process that already has an exit request in effect will help with some analysis we're carrying out.

Back to the analysis then...

Thanks again folks!