process wait hack for linux