refine errno and setrlimit