How to catch the SIGTERM from the xterm

Faustin Ngokse eedfang@REDACTED
Thu Jun 27 10:40:18 CEST 2002


Hello erl-community,

I have some problems to trap the SIGTERM signal from a xterm in a erlang 
process.

I start a server process in a x-terminal with the following shell command:
/bin/sh /home/faustin/erlang/server -debug -config 
/home/faustin/erlang/config/turbo_server.cfg

It generates the process:
/opt/erlang/otp_LXA_11930_sunos5_R6B/erts-4.9.1/bin/beam -- -root 
/opt/erlang/otp_LXA_11930_sunos5_R6B -progname erl -- -pa -sname 
turbo_server -noshell -noinput -s server go -- --debug --config 
/home/faustin/erlang/config/turbo_server.cfg -home /home/faustin

I stop the server by just entering ctrl-c in the xterm.

my problem:
I want to send out some information messages to all connected clients 
before exiting; therefore I need to catch the SIGTERM sent by the xterm 
to erlang.
Does erlang provide such a feature?

Best regards;
thanks in advance

Faustin



More information about the erlang-questions mailing list