We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d1885f commit e24c749Copy full SHA for e24c749
labs/demos/longproc.sh
@@ -0,0 +1,19 @@
1
+#!/usr/bin/env bash
2
+#
3
+# longproc.sh
4
+# Copyright (C) 2014 ynonperek <ynonperek@Ynons-MacBook-Air.local>
5
6
+# Distributed under terms of the MIT license.
7
8
+
9
+(sleep 60; echo bye > talk) &
10
+TOKILL=$!
11
12
+while read LINE < talk
13
+do
14
+ if [[ $LINE == "bye" ]]; then
15
+ kill -9 $TOKILL
16
+ exit 1
17
+ fi
18
+done
19
labs/demos/server.sh
+# server.sh
+mkfifo talk
+ if [[ $LINE == "ls" ]]; then
+ ls
+ elif [[ $LINE == "bye" ]]; then
+ exit
0 commit comments