Forground process control

First attempt at foreground process support. More work is likely needed but this seemed like a good basis.