×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Can you provide a little detail on why a signal handler is better than
%SHTDN or provide some links so I can read up on it myself? I've always
used %SHTDN so your reference to it being "clunky" made me go HUH?
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Scott
Klement
Sent: Friday, June 26, 2020 3:31 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: How to properly Ending a background program
Shutting things down with *CNTRLD will also send a SIGTERM signal to the
job, so your program could use a signal handler (vs. the very clunky %SHTDN
BIF) to catch the condition and end immediately.
On 6/26/2020 12:30 PM, smith5646midrange@xxxxxxxxx wrote:
If the sleeping loop is in the RPGLE, you can use %SHTDN. That also
trips on the same conditions as RTVJOBA.
Just remember when you are shutting things down (PWRDWNSYS, ENDJOB,
ENDSBS,
etc.) make sure you end it *CNTRLD instead of *IMMED and allow it
enough time for it to react and do whatever needs to be done before
ending. For example, if the job sleeps for 10 minutes and you end it
*CNTRLD with a 5 minute window, it might not wake in time to exit
gracefully.
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.