# $Id: README,v 1.2 2012/10/08 19:42:27 ksb Exp $ This program could be a perl script, but that takes more VM than the tiny C program. It is also more error-prone for the pkill meme that we use to terminate the forever shim, in the rare case where we need to do that. {N.B. pkill ... "perl" is apt to kill random unrelated scrips.} Let's compare the forever binary to the perl version: PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 6675 ksb 1 20 0 964K 556K pause 1 0:05 0.00% ksh 7452 ksb 1 20 20 1312K 560K pause 0 0:00 0.00% forever 7455 ksb 1 20 0 3204K 2532K pause 0 0:00 0.00% perl The C version is about 40% the size, and about 22% of the RSS of the perl version. Since both processes will be swapped out after a while, the RSS doesn't matter as much. It might seem like a nit to save so little, but every little bit helps. For reference I included my shell, you can see that the forever process compares nicely that process. It might be clever to make forever chdir to slash. I'm not sure about that, and you can always do that yourself. I included the close of the standard fds because "forever <&- >&- 2>&-" requries a shell to run, and was the most common usage in production. --ksb, Oct 2012