make xfunctions optionally longjump instead of exit.

use it for making NOFORK more practical.
touch: make it a NOFORK applet
This commit is contained in:
Denis Vlasenko
2007-04-09 21:35:07 +00:00
parent cd7001f705
commit 3f3aa2a57d
10 changed files with 39 additions and 24 deletions

View File

@ -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)