mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 15:22:31 +01:00
Update wikipage Managing CTRL+C in console application. (Signed-off-by:tioui).
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2015 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -11,7 +11,7 @@ To detect the exception, you can <code>inherit</code> from the <code>EXCEPTIONS<
|
|||||||
<code>
|
<code>
|
||||||
note
|
note
|
||||||
description: "Show how to quit an application using CTRL+C (without trace)."
|
description: "Show how to quit an application using CTRL+C (without trace)."
|
||||||
autheur: "Louis Marchand"
|
author: "Louis Marchand"
|
||||||
date: "Wed, 25 Apr 2018 23:12:33 +0000"
|
date: "Wed, 25 Apr 2018 23:12:33 +0000"
|
||||||
revision: "0.1"
|
revision: "0.1"
|
||||||
|
|
||||||
@@ -24,20 +24,20 @@ inherit
|
|||||||
create
|
create
|
||||||
make
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialisation
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make
|
make
|
||||||
-- Exécute l'application.
|
-- Launch `Current'.
|
||||||
local
|
local
|
||||||
l_ctrl_c:BOOLEAN
|
l_ctrl_c:BOOLEAN
|
||||||
do
|
do
|
||||||
if not l_ctrl_c then
|
if not l_ctrl_c then
|
||||||
from until False loop
|
from until False loop
|
||||||
io.standard_default.put_string ("Appuyez sur CTRL+C%N")
|
io.standard_default.put_string ("Press CTRL+C%N")
|
||||||
io.input.read_line
|
io.input.read_line
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
io.standard_default.put_string ("%NFermeture...%N")
|
io.standard_default.put_string ("%NClosing...%N")
|
||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
if attached {OPERATING_SYSTEM_SIGNAL_FAILURE}
|
if attached {OPERATING_SYSTEM_SIGNAL_FAILURE}
|
||||||
|
|||||||
Reference in New Issue
Block a user