Provide an alternative to exiting immediately upon save_cwd or
authorJim Meyering <jim@meyering.net>
Tue, 14 Jun 2005 06:54:39 +0000 (06:54 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 14 Jun 2005 06:54:39 +0000 (06:54 +0000)
commit8c98346f6f1837e1aae8c04dc52f56c04cacefa6
tree4d8eb61de2b3e339efaa22ac41cba039775432de
parent57f2a7090ce3653874a0815b572592409e273d7c
Provide an alternative to exiting immediately upon save_cwd or
restore_cwd failure.  Now, an application can arrange e.g.,
to perform a longjump in that case.
* openat.c: Include dirname.h.
Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
(rpl_openat, fdopendir, fstatat): Call openat_save_die
and openat_restore_die rather than calling error directly.
Don't include "error.h" or "exitfail.h"; they're no longer needed.

* openat-die.c (openat_save_die, openat_restore_die): New file.
* openat.h (openat_save_die, openat_restore_die): Declare and define.
lib/openat.c