#!/bin/bash # Copyright (C) 2009 Google Inc. cat <&1 exec $1 "\$@" 2>&1 >&3 | { PRIORITY=debug log "Started $1 \$*" while read; do log "\$REPLY" done PRIORITY=debug log "EOF on stderr, exiting" } EOF