Skip to content

Commit

Permalink
document -ign_exit option
Browse files Browse the repository at this point in the history
  • Loading branch information
gsauthof committed Jul 2, 2013
1 parent ed4dffe commit 2e172c1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,22 @@ The unittests need [libcheck][check].
functions/macros that could be useful for general purpose DB
related programs

## Pitfalls

When tracing and _exit() (i.e. not exit()) is called the
execution of the libtraceproc destructor function and flushing of
IO-buffers is implementation defined.

Most likely it is not executed and buffers are not flushed - in
that case stats are not printed on exit and the logfile (when
-flogfile is specied) does not contain the last content buffer.

If you know what you are doing you can use the -ign_exit option
to map _exit()/_Exit() calls to exit().

Usually, this should not be an issue, because most sane programs
exit via return statement from main() or call exit().

## License

[GPLv3+][gpl]
Expand Down
9 changes: 9 additions & 0 deletions example/exit.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>


int main(int argc, char **argv)
{
_exit(0);
}

0 comments on commit 2e172c1

Please sign in to comment.