×
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.
I've always put the %SHTDN at the bottom of my processing loop (a read loop or a sleep loop). Do what needs done and then IF %SHTDN, exit loop.
So with the signal method, if the program is sleeping and a signal is sent, does it wake it up out of the sleep? Can you point me to a decent site to show how to create and activate a signal program? This sounds like something I would like to understand.
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Scott Klement
Sent: Saturday, June 27, 2020 2:02 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: How to properly Ending a background program
Because with %SHTDN, you have to poll for the condition... i.e. check %SHTDN every second or two to see if an end request was sent. This is what I mean by "clunky"
With a signal, it calls your designated routine the moment the signal is sent, so you can respond immediately, no need for polling.
On 6/26/20 10:17 PM, smith5646midrange@xxxxxxxxx wrote:
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?
As an Amazon Associate we earn from qualifying purchases.