T.R | Title | User | Personal Name | Date | Lines |
---|
498.1 | Not running any program | CADSE::MCCARTHY | none available | Fri Jun 12 1987 07:09 | 21 |
| What are you trying to do? Stop the subprocess completely or just
prevent it from setting its priority?
Two things may be happening: (assuming your subprocess recieved
the FORCEX)
1. You subprocess is trying to exit but because of system overhead
it is taking too long!
2. Your process was not running anything to force it out of.
From my experence, when you send a FORCEX signal to a process
that is doing only DCL commands like "$ I = I + 1", the FORCEX
has no effect. Why ? Do a show process/continuious on your
subprocess (last line shows what program it is running), my guess
is that it is not doing executing any program to force it to exit
from. (I just did it)
Why not do a $DECPRC on it?
mac
|
498.2 | $forcex <> $delprc | FROST::HARRIMAN | Elephant Talk | Fri Jun 12 1987 10:04 | 17 |
|
SYS$FORCEX queues a user-mode exit image AST. DCL does not count as
an image. Also, any higher-mode AST's must be serviced before the
user mode AST - for instance a LEF wait needs to be cleared before
$FORCEX works. I ended up writing a much longer version of your
program a while ago to get "clean" exits (cleaner than $DELPRC anyway)
and I found (along with reading the manual) many instances where
a $FORCEX does essentially nothing but increment the count of user-mode
AST's pending on a given process.
Question: does anyone know whether or not you can get a detached
process to delete itself via $FORCEX? It would seem that since there
is no CLI in a detached process that issuing a $FORCEX should cause
it to exit as long as it was in user mode. However, I don't recall
that detached processes get to user mode. Clarification?
/pjh
|
498.3 | I want to force a particular exit status | FALEK::FALEK | ex-TU58 King | Fri Jun 12 1987 12:27 | 8 |
| I was trying to force the sub-process to complete with a particular status.
I want the parent process (which did a $LIB$SPAWN with wait) to be able
to tell whether its sub-process was aborted via a command from the
user interface (which is a separate program). If the user interface
does a $DELPRC, the parent gets SUCCESS status for the subprocess!
Any ideas?
|
498.4 | of the process or the image? | FROST::HARRIMAN | Elephant Talk | Fri Jun 12 1987 17:44 | 25 |
|
> I was trying to force the sub-process to complete with a particular status.
>
> I want the parent process (which did a $LIB$SPAWN with wait) to be able
> to tell whether its sub-process was aborted via a command from the
> user interface (which is a separate program). If the user interface
> does a $DELPRC, the parent gets SUCCESS status for the subprocess!
Ain't that apples and oranges? Subprocess completion will usually
be success, unless you actually crash the process.
A $FORCEX doesn't get you anything there, even if you send something
like SS$_ABORT at it, it's in the context of the subprocess...
How is the parent process receiving the status?
It's possible you are seeing LIB$SPAWN completing successfully too...
If I recall, LIB$SPAWN allows you to specify a longword to hold
the completion status. I assume this is what you are using....
I also recall that if you use $CREPRC instead you can use a mailbox
to receive the "termination message" of the sub/detached process.
Have you tried it that way?
/pjh
|
498.5 | summary | OPA0::FALEK | ex-TU58 King | Sun Jun 14 1987 00:43 | 13 |
| I've gotten around my problem of telling whether the sub-process was
aborted by using a different mechanism.
The brief summary of what I found out about $FORCEX is:
It makes the current image exit (via SYS$EXIT) - however DCL does not
count as an image, so the user-mode AST stays queued and the NEXT image
run by the process gets it (assuming user-mode ASTs are enabled).
Since in my application I have no idea what the sub-process is running,
I can't use $FORCEX to reliably force an exit with status. So I now
use $DELPRC and look at an "abort-was-requested" flag that the user
interface sets.
thanks - Lou Falek
|