diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-09 21:35:07 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-09 21:35:07 +0000 |
commit | 3f3aa2a57dc648ade9083f3b3ad83cce8206b912 (patch) | |
tree | d5c648f583bb2edef25f05c2bed303df3d1a61f6 /libbb/copyfd.c | |
parent | cd7001f7055c3fc2d6298ab9e3befe91e951c652 (diff) | |
download | busybox-w32-3f3aa2a57dc648ade9083f3b3ad83cce8206b912.tar.gz busybox-w32-3f3aa2a57dc648ade9083f3b3ad83cce8206b912.tar.bz2 busybox-w32-3f3aa2a57dc648ade9083f3b3ad83cce8206b912.zip |
make xfunctions optionally longjump instead of exit.
use it for making NOFORK more practical.
touch: make it a NOFORK applet
Diffstat (limited to 'libbb/copyfd.c')
-rw-r--r-- | libbb/copyfd.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
77 | if (sz != -1) | 77 | if (sz != -1) |
78 | bb_error_msg_and_die("short read"); | 78 | bb_error_msg_and_die("short read"); |
79 | /* if sz == -1, bb_copyfd_XX already complained */ | 79 | /* if sz == -1, bb_copyfd_XX already complained */ |
80 | exit(xfunc_error_retval); | 80 | sleep_and_die(); |
81 | } | 81 | } |
82 | #endif | 82 | #endif |
83 | 83 | ||
@@ -97,7 +97,7 @@ void bb_copyfd_exact_size(int fd1, int fd2, off_t size) | |||
97 | if (sz != -1) | 97 | if (sz != -1) |
98 | bb_error_msg_and_die("short read"); | 98 | bb_error_msg_and_die("short read"); |
99 | /* if sz == -1, bb_copyfd_XX already complained */ | 99 | /* if sz == -1, bb_copyfd_XX already complained */ |
100 | exit(xfunc_error_retval); | 100 | sleep_and_die(); |
101 | } | 101 | } |
102 | 102 | ||
103 | off_t bb_copyfd_eof(int fd1, int fd2) | 103 | off_t bb_copyfd_eof(int fd1, int fd2) |