#!/bin/sh
while true; do
$@ &
PID=$!
sleep 1
inotifywait $1 # FIXME: that's not the file
kill $PID
done