Re: [hackers] [ubase] Add respawn || sin

From: FRIGN <dev_AT_frign.de>
Date: Thu, 17 Apr 2014 15:23:29 +0200

On Thu, 17 Apr 2014 15:08:50 +0200
git_AT_suckless.org wrote:

> Add respawn

A truly genius program!
Take this example[0], which is very complex and difficult to solve
using initrd/upstart (Yuck!).
Doing this in the shell using respawn makes this trivial:

%PROGRAM% || respawn %PROGRAM% (only respawn on exit-code 0)
%PROGRAM% && respawn %PROGRAM% (only respawn on exit-code 1)

Good job!

Cheers

FRIGN

[0]: http://www.linuxquestions.org/questions/linux-server-73/how-can-i-tell-init-to-respawn-a-process-only-on-exit-code-0-a-4175464661/

-- 
FRIGN <dev_AT_frign.de>
Received on Thu Apr 17 2014 - 15:23:29 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 17 2014 - 15:24:15 CEST