Title: | *OLD* ALL-IN-1 (tm) Support Conference |
Notice: | Closed - See Note 4331.l to move to IOSG::ALL-IN-1 |
Moderator: | IOSG::PYE |
Created: | Thu Jan 30 1992 |
Last Modified: | Tue Jan 23 1996 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 4343 |
Total number of notes: | 18308 |
Hi. I am trying to write what should be a very simple script: ATTACH SPECIFIC_USERNAME !Attempt to attach to a specific process IFNOTSTATUS SPAWN DCL_COM_FILE !If ATTACH fails then SPAWN However, OA$STATUS is not set until after the script completes, and control is returned to the user. Is this the way it should work, or is this a bug. Thanx, Neil
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1038.1 | Use .IF NOT OA$STATUS THEN SPAWN? | WAYLND::HOWARD | Our business is computers not money | Mon Jul 13 1992 22:15 | 7 |
I believe IFNOTSTATUS only works on a continuation line, such as ATTACH SPECIFIC_USERNAME \IFNOTSTATUS\SPAWN DCL_COM_FILE I think you would want to check OA$STATUS yourself. Ben | |||||
1038.2 | .1 is right but there is more to the story | ACUMEN::VICKERS | Rearranging the DEChairs | Tue Jul 14 1992 02:57 | 26 |
Ben answer is correct as far as it goes but there is more to the problem. Mainly, ATTACH and SPAWN do not set OA$STATUS properly in V2. I just tried <ATTACH USER_SPECIFIC \GET OA$STATUS and the following were in the message buffer: Messages %OA-W-ATTACHFAIL, Error attempting to ATTACH to process "USER_SPECIFIC" -SYSTEM-W-NONEXPR, nonexistent process %OA-I-LASTLINE, 1 This was on a V2.4 system and there was, of course, no process named USER_SPECIFIC. On a V3.0 system OA$STATUS would be 0. The lack of setting OA$STATUS has been discussed in this or the previous version of the conference. I don't recall that there is a solution short of resorting to DCL to detect the target subprocess. Most applications which use subprocesses use symbols to signal that they have created the subprocess. This is imperfect, of course, since the subprocess may disappear without affecting the symbols. Have fun, don | |||||
1038.3 | try this little procedure / UDP; change "skinner_slave" to whatever... | SKNNER::SKINNER | I'm doing my EARS | Wed Jul 15 1992 22:01 | 3 |
.FU oa$msg_purge .FU attach skinner_slave .if oa$msg_id eqs "ATTACHFAIL" then .FU oa$msg_purge\spawn |