added option 'env' to control process environment variables