set HOME, UID and USER correctly
separate args for -A (everything) -S (USER) -H (HOME)
separate env for linux and osx
nanosleep, where available