FWIW I note that the BPX1MSS documentation (z/OS V2R1.0 UNIX System Services
Programming: Assembler Callable Services Reference) says "Both MVS task
termination and the mvsprocclp service (BPX1MPC, BPX4MPC) perform the
mvsunsigsetup service."

It appears that may not be happening in task termination.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Charles Mills
Sent: Thursday, July 30, 2020 10:00 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: ESTAEX exit WAIT question

Thanks @Peter. I wondered about an ATTACH RMTR. 

I was fishing a bit when I wrote the OP. I understand the problem now:

I have a non-authorized batch program. I have complete control over the
logic. It runs a UNIX program as a subtask. I have no control over the logic
of the UNIX program. 

Under certain circumstances -- a timeout -- the batch program cancels the
UNIX program subtask. (DETACH and ABEND S13E) The batch program then runs
another UNIX program as a subtask -- with no issues. This has been working
perfectly for years.

I want to add logic such that if the batch program user cancels (CANCEL
ABEND S222) the batch program it similarly cancels the UNIX program and
attaches another. I have an ESTAEX exit that catches the ABEND Sx22 and does
the DETACH and ATTACH. The problem I am seeing is that the second UNIX
program fails with Reason Code 0D070201 JRAlreadySigSetUp: BPX1MSS found the
process already set up for signals.

My inference is that the first UNIX program does not finish "cleaning up" in
this situation. It does not finish cleaning up when DETACHed by an ESTAEX
exit, even though it does clean up properly when DETACHed by the mainline in
a timeout situation.

(I can't clean up the signal registration myself with BPX1MSD() -- that
fails because the running main task does not own the signal registration,
the terminated subtask does.)

Any thoughts or suggestions?

I tried STAE=YES on the DETACH with no apparent effect other than that it
changed the subtask ABEND from S13E to S33E. I have not tried using ETXR (or
RMTR <g>). Not sure what I would do differently or additionally with an
ETXR. ETXR is documented as running on the originating task, so I would have
the same problem with BPX1MSD().

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to