T.R | Title | User | Personal Name | Date | Lines |
---|
566.1 | sure, use a job table logical | BIGALO::GRAZIANO_ROB | i want to fly like a Beagle | Wed Sep 30 1987 09:14 | 9 |
| have the subprocess assign a logical, say "SUB_DEFAULT", in the
job table.. them have the main process "$set def SUB_DEFAULT:"
if the subprocess is running an executable, not at dcl, and you
created that executable, you can set the logical by
lib$set_logical("SUB_DEFAULT", the_default, "LNM$JOB", , )
have fun,
rocko
|
566.2 | | SQM::HALLYB | I sell too soon | Mon Oct 12 1987 13:42 | 7 |
| Presumably you know that there is an F$ENVIRONMENT("DEFAULT").
Together with the PID and the job logical name table you have
all you need.
Not crystal clean, but easily workable.
John
|
566.3 | Further clarification of the problem | ARVOX::MARK | Mark Gillis, 273-3516, VRO3-3/B6 | Thu Oct 22 1987 14:18 | 13 |
| >While in my main process, I want to find out the default disk and directory of
>a subprocess that I own in my job tree. I want to then change the
>main process default to that of the sub process in a command procedure.
Thanks for the feedback so far - it has been helpful.
Let me clarify the problem a bit. The sub-process whose default device and
directory I want to get is not running an image or command procedure that
I can control. It is an interactive process at the command level. Therefore
I have to get that information completely through the main process - I cannot
program the sub-process to send the information to me one way or another.
Thanks,
|
566.4 | | STAR::PIPER | Derrell Piper - VAX/VMS Development | Fri Oct 23 1987 09:07 | 6 |
| It sounds like you'll have to write an image that queues a special
kernel AST to the subprocess and then sets up some magic symbols that
you can read in your main process' command procedure.
Somewhere, probably VMSNOTES, someone recently posted the guts of an
image that does the QAST.
|
566.5 | | SMAUG::MENDEL | Pessimists Always Get Good News. | Fri Oct 23 1987 13:43 | 5 |
| It seems to me that you should be able to find the default directory
from the PCB, no?
(A curious person)
Kevin
|
566.6 | | NEWVAX::CRITZ | Don't shuffle my stack, I had 4 aces! | Fri Oct 23 1987 18:02 | 4 |
| RE: .5
No, since it's stored in two places, neither of which is the PCB
(paged pool and P1 space to be exact)
|
566.7 | RE .6 | SMAUG::MENDEL | Pessimists Always Get Good News. | Mon Oct 26 1987 12:32 | 11 |
| Oops. I know its not _in_ the PCB.
I thought, though, that there should be a pointer trail from the
PCB to a data structure with the process's default directory spec.
How does a process find it's own default directory? Is it at (or
off of) a fixed location in P1 space?
(still curious)
Kevin
|
566.8 | | STAR::PIPER | Derrell Piper - VAX/VMS Development | Wed Oct 28 1987 08:23 | 7 |
| A process should call SYS$SETDDIR, which can return the current
directory spec. This service, formerly documented in the RMS Reference
Manual is now documented in the System Service Reference Manual
SYS-446.3 (V4.4).
SYS$SETDDIR most likely looks at PIO$GT_DDSTRING which is the P1
address of the default directory string (from [SYS.LIS]SHELL.LIS).
|
566.9 | Why and why not | MDVAX3::COAR | My hero? Vax Headroom, of course! | Thu Dec 17 1987 15:50 | 12 |
| As I understand it, this functionality has not heretofore been provided
(though muchly desired) because the SPKAST would have to call $TRNLNM
to find the definition of SYS$DISK. Since that may point to a logical
name that is meaningless to another process (i.e., resides in the
target's process-logical-name-table only), and because of the overhead
involved (charges quite a bit of CPU time to the target, who's all
unaware), it has been left as an exercise for the hacker. Or so
I was told. Perhaps this functionality is present in the SUMR (Still
Unannounced Major Release) to come. I don't know; I haven't been
watching those conferences (conferecii?)..
#ken :-)}
|