Skip to content

Commit 611d0c1

Browse files
authored
COMAL/solution_2: apply timeouts to socat invocations (PlummersSoftwareLLC#720)
1 parent f491b86 commit 611d0c1

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

PrimeCOMAL/solution_2/build.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
export TERM=xterm
22

3-
socat - EXEC:'opencomal',pty,setsid,ctty > /dev/null << EOF
3+
set -e
4+
5+
timeout -s 9 1m socat - EXEC:'opencomal',pty,setsid,ctty > /dev/null << EOF
46
ENTER "opencomal.txt"
57
SAVE "opencomal.cml"
68
BYE

PrimeCOMAL/solution_2/run.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
export TERM=xterm
22

3-
socat - EXEC:'opencomalrun opencomal.cml',pty,setsid,ctty < /dev/zero > /dev/null
3+
timeout -s 9 1m socat - EXEC:'opencomalrun opencomal.cml',pty,setsid,ctty < /dev/zero > /dev/null
44

5-
cat output.txt
6-
rm output.txt
5+
if [ -f output.txt ]; then
6+
cat output.txt
7+
rm output.txt
8+
fi

0 commit comments

Comments
 (0)