I have been running various flavours of 6.x for some time now with the
Empress relational database and Apache webserver. One of the issues I have
encountered is how do I detect that a user has initiated a shutdown request,
such that I might gracefully cycle down the database before the CPU powers
off?
When running SCO Unix with Oracle, I was able to simply place a batch file
in a certain directory structure which the system examined upon shutdown.
Scripts in this directory structure would be automatically run by the system
if a shutdown request was made, allowing me to shutdown Oracle gracefully.
I have found nothing in the documentation that tells me that the same is
possible under the QNX OS. Does anyone know of a way to start a process if
a shutdown request is made (other than replacing the QNX shutdown command
with a custom program)?
Randy Aeberhardt
raeberhardt@tantalus-systems.com
www.tantalus-systems.com
Not sure about QNX6 but in QNX4 you could catch SIGPWR in a program and then
spawn a shell to run a script, or whatever.
Randy Aeberhardt wrote:
I have been running various flavours of 6.x for some time now with the
Empress relational database and Apache webserver. One of the issues I have
encountered is how do I detect that a user has initiated a shutdown request,
such that I might gracefully cycle down the database before the CPU powers
off?
When running SCO Unix with Oracle, I was able to simply place a batch file
in a certain directory structure which the system examined upon shutdown.
Scripts in this directory structure would be automatically run by the system
if a shutdown request was made, allowing me to shutdown Oracle gracefully.
I have found nothing in the documentation that tells me that the same is
possible under the QNX OS. Does anyone know of a way to start a process if
a shutdown request is made (other than replacing the QNX shutdown command
with a custom program)?
Randy Aeberhardt
raeberhardt@tantalus-systems.com
www.tantalus-systems.com
Would the O/S wait while your script is being run, or does it simply kill
all running processes?
I need a guaranteed method of running a script at shutdown otherwise I could
corrupt the database.
“Dean Douthat” <ddouthat@faac.com> wrote in message
news:3B61C0E5.BA0EE070@faac.com…
Not sure about QNX6 but in QNX4 you could catch SIGPWR in a program and
then
spawn a shell to run a script, or whatever.
Randy Aeberhardt wrote:
I have been running various flavours of 6.x for some time now with the
Empress relational database and Apache webserver. One of the issues I
have
encountered is how do I detect that a user has initiated a shutdown
request,
such that I might gracefully cycle down the database before the CPU
powers
off?
When running SCO Unix with Oracle, I was able to simply place a batch
file
in a certain directory structure which the system examined upon
shutdown.
Scripts in this directory structure would be automatically run by the
system
if a shutdown request was made, allowing me to shutdown Oracle
gracefully.
I have found nothing in the documentation that tells me that the same is
possible under the QNX OS. Does anyone know of a way to start a process
if
a shutdown request is made (other than replacing the QNX shutdown
command
with a custom program)?
Randy Aeberhardt
raeberhardt@tantalus-systems.com
www.tantalus-systems.com