From c4199f22d0f7793b70db51c01783f0d45afce3d4 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 1 Apr 2016 22:12:44 +0200 Subject: libbb: two new functions: wait_for_exitstatus(pid), xfchdir(fd) Bartosz Golaszewski proposed xfchdir() Signed-off-by: Denys Vlasenko --- runit/chpst.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runit/chpst.c') diff --git a/runit/chpst.c b/runit/chpst.c index 301cdd08a..7fe5151db 100644 --- a/runit/chpst.c +++ b/runit/chpst.c @@ -255,8 +255,7 @@ static NOINLINE void edir(const char *directory_name) xsetenv(d->d_name, buf); } closedir(dir); - if (fchdir(wdir) == -1) - bb_perror_msg_and_die("fchdir"); + xfchdir(wdir); close(wdir); } -- cgit v1.2.3