Commit d98834c6 authored by Per Cederqvist's avatar Per Cederqvist

Added a library of wrapper functions that checks for EINTR.

Use the libeintr wrappers instead of fopen, fclose and rename.
parent 6ca70b02
2002-10-31 Per Cederqvist <ceder@ceder.dyndns.org>
Added a library of wrapper functions that checks for EINTR.
* configure.in: Generate src/libraries/libeintr/Makefile.
* src/libraries/Makefile.am (SUBDIRS): Added libeintr.
* src/libraries/libeintr/gen-wrapper.awk: New file. Generate
simple wrappers that check for EINTR.
* src/libraries/libeintr/funcs.txt: New file. Use wrappers for
fopen, fclose and rename.
* src/libraries/libeintr/eintr.h.pre: New file.
* src/libraries/libeintr/Makefile.am: New file.
Use the libeintr wrappers instead of fopen, fclose and rename.
* src/server/Makefile.am (AM_CPPFLAGS): Added libeintr.
(lyskomd_LDADD): Ditto.
(dbck_LDADD): Ditto.
(LDADD): Ditto.
* src/server/updateLysKOM.c (main): Use i_fopen instead of fopen.
Don't forget to close the status file.
* src/server/splitkomdb.c (copy_file, copy_db_file): Use i_fopen
and i_fclose instead of fopen and fclose.
* src/server/simple-cache.c (is_clean, get_version, post_sync)
(save_one_text, sync_part, init_cache, free_all_cache): Use
i_fopen and i_fclose instead of fopen and fclose.
(pre_sync): Ditto, and i_rename instead of rename.
* src/server/ramkomd.c (save_pid, dump_exit_statistics): Use
i_fopen and i_fclose instead of fopen and fclose.
* src/server/ram-smalloc.c (trace_alloc_file): Use f_fopen
intstead of fopen.
* src/server/pidfile.c (read_pid_file): Use i_fopen and i_fclose
instead of fopen and fclose.
* src/server/komrunning.c (create_status): Use i_fopen and
i_fclose instead of fopen and fclose.
* src/server/dbck.c (garb_text_file): Use i_rename instead of
rename. Check the return value.
* src/server/dbck-cache.c (get_version, is_clean, cache_sync_all)
(cache_open_new_text_file, init_cache): Use i_fopen, i_fclose and
i_rename instead of fopen, fclose and rename.
* src/server/connections.c (dump_statistics): Use i_fopen and
i_fclose instead of fopen and fclose.
(dump_connections): Ditto, and i_rename instead of rename.
* src/server/conf-file.c (read_config): Use i_fopen and i_fclose
instead of fopen and fclose.
* src/server/aux-item-def-parse.y (parse_aux_item_definitions):
Use i_fopen and i_fclose instead of fopen and fclose.
2002-10-28 Per Cederqvist <ceder@ingate.com>
Check if rename really sets errno to EINTR.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment