Coding Guidelines/Filesystem Manipulation: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:
= robust_open =
= robust_open =
: in common-src/file.c
: in common-src/file.c
This function wraps ''open'' to retry on certain failures.
This function wraps ''open'' to retry on certain failures, and sets the close-on-exec flag.


= robust_close =
= robust_close =
: in common-src/file.c
: in common-src/file.c
This function wraps ''close'' to retry on certain failures.
This function wraps ''close'' to retry on certain failures.

Revision as of 19:44, 22 May 2007

Amanda supplies a few wrapper functions around the ordinary descriptor operations to handle a few common cases. In most cases, these functions are preferred over calling the wrapped function directly.

robust_open

in common-src/file.c

This function wraps open to retry on certain failures, and sets the close-on-exec flag.

robust_close

in common-src/file.c

This function wraps close to retry on certain failures.