Mercurial > hg > plml
view cpp/logio @ 37:89688ebc447f tip
Deprecating this repository.
author | samer |
---|---|
date | Mon, 05 Jan 2015 17:42:03 +0000 |
parents | d892e2012f79 |
children |
line wrap: on
line source
#!/bin/sh function handle_term { echo "### $(date): received SIGTERM" >> "$outputlog" exit } function handle_int { echo "### $(date): received SIGINT" >> "$outputlog" } function handle_hup { echo "### $(date): received SIGHUP" >> "$outputlog" exit } trap handle_int 2 trap handle_term 15 trap handle_hup 1 inputlog="$1" outputlog="$2" shift 2 echo "### $(date): INPUT - $@" >> "$inputlog" echo "### $(date): OUTPUT - $@" >> "$outputlog" nohup tee -a "$inputlog" | "$@" | nohup tee -a "$outputlog"