From 3f3aa2a57dc648ade9083f3b3ad83cce8206b912 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 9 Apr 2007 21:35:07 +0000 Subject: make xfunctions optionally longjump instead of exit. use it for making NOFORK more practical. touch: make it a NOFORK applet --- libbb/copyfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libbb/copyfd.c') diff --git a/libbb/copyfd.c b/libbb/copyfd.c index 0d0ec2232..805b80187 100644 --- a/libbb/copyfd.c +++ b/libbb/copyfd.c @@ -77,7 +77,7 @@ void complain_copyfd_and_die(off_t sz) if (sz != -1) bb_error_msg_and_die("short read"); /* if sz == -1, bb_copyfd_XX already complained */ - exit(xfunc_error_retval); + sleep_and_die(); } #endif @@ -97,7 +97,7 @@ void bb_copyfd_exact_size(int fd1, int fd2, off_t size) if (sz != -1) bb_error_msg_and_die("short read"); /* if sz == -1, bb_copyfd_XX already complained */ - exit(xfunc_error_retval); + sleep_and_die(); } off_t bb_copyfd_eof(int fd1, int fd2) -- cgit v1.2.3