Exitcode - Too Many TVs
Bluesanct
2019
seen from China

seen from Germany
seen from China

seen from United States

seen from Italy

seen from United States
seen from Canada

seen from United Kingdom
seen from Hong Kong SAR China

seen from Italy

seen from Italy

seen from Malaysia
seen from Türkiye

seen from Italy
seen from China
seen from South Africa
seen from United States
seen from China
seen from China
seen from United States
Exitcode - Too Many TVs
Bluesanct
2019

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
予約済みExitCode
exit codeの使い分けに関して
exit codes
code 意味 例 コメント 1 一般的なエラー全般 $ let "var 1 = 1 / 0" ゼロ除算などのコマンドを継続できない雑多なエラー 2 (Bash のドキュメントによると)シェルビルトインな機能の誤用 $ empty_function(){} キーワードのつけ忘れ やコマンド,または権限周りの問題(あと,diff がバイナリファイルの比較に失敗した時) 126 呼び出したコマンドが実行できなかった時 $ /dev/null パーミッションの問題かコマンドが executable でない時 127 コマンドが見つからない時 $ illegal_command $PATH がおかしい時や typo した時などに起こる 128 exit コマンドに不正な引数を渡した時 $ exit 3.14159 exit コマンドは 0〜255 の整数だけを引数に取る 128+n シグナル n で致命的なエラー $ kill -9 $PPID 例では, $? は 137(128 + 9)を返す 130 スクリプトが Ctrl+C で終了 Ctrl+C Ctrl+C はシグナル2で終了する = 128 + 2 = 130(上記) 255 範囲外の exit status $ exit -1 exit コマンドは 0〜255 の整数だけを引数に取る
Exit Code 1, 2, 126〜165, 255 は特別な意味を持つため、スクリプトやプログラム内でexitするときは注意
ref
コマンドラインツールを書くなら知っておきたい Bash の 予約済み Exit Code -Qiita
Appendix E. Exit Codes With Special Meanings
ping pong for server response
$ date; if ! ping -c 1 -w 5 mail.lkjl.com ; then echo "failed PONG"; else date; fi Wed Mar 25 13:12:44 EDT 2015 ping: unknown host mail.lkjl.com failed PONG
$ date; if ! ping -c 1 -w 5 mail.yahoo.com ; then echo "failed PONG"; else date; echo "PING"; fi Wed Mar 25 13:12:51 EDT 2015 PING any-ats.member.a02.yahoodns.net (98.139.21.169) 56(84) bytes of data. 64 bytes from ats1.member.vip.bf1.yahoo.com (98.139.21.169): icmp_seq=1 ttl=54 time=30.5 ms --- any-ats.member.a02.yahoodns.net ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 57ms rtt min/avg/max/mdev = 30.565/30.565/30.565/0.000 ms Wed Mar 25 13:12:51 EDT 2015
A better way:
ping -q -c 1 -w 5 mail.yahoo.com &> /dev/null && echo "PING" || echo "PONG"
It uses -q to suppress output from ping itself, and in addition redirects both STDERR and STDOUT to /dev/null.
Probably this would benefit from being a real script exit codes, but it will do as a dirty one liner.
UpStart respawn only when process exited with exitcode != 0
I fell for the handling of upstart with the stanza respawn documented here: http://upstart.ubuntu.com/cookbook/#respawn
A process HAS to exit with a exitcode != 0 to be restarted. Changed that to force a restart from my script.