How to catch *** - EVAL: User break?

Jean Louis <[email protected]>
Newsgroups gmane.lisp.clisp.general
Message-ID <[email protected]>

Hello,

I am trying to convert my thinking from Perl to Common Lisp, CLISP
implementation.

And I have noticed that if I interrupt this execution, the lock file
is going to stay there forever.

I can see error message:

*** - EVAL: User break

How can I prevent that break (CTRL-C) so that I execute some finished
removals of the lock file, before the program is stopped?

Jean

#!/usr/bin/clisp -q -norc
(defparameter lock-file "/tmp/Crontab.lock")
(when (probe-file lock-file) (princ "Process is already running.") (exit 1))
(setf lock-file (open lock-file :if-does-not-exist :create))
(shell "/home/data1/protected/bin/CRM/LG-ProcessRemoteLeads-yaml.pl /home/data1/protected/.business-global.yml")
(shell "/home/data1/protected/bin/CRM/Mailing.pl continue")
(close lock-file)
(delete-file lock-file)



----- End forwarded message -----

------------------------------------------------------------------------------
_______________________________________________
clisp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.