debian man page for sttransaction

Query: sttransaction

OS: debian

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

sttransaction(3)					    ShapeTools Toolkit Library						  sttransaction(3)

NAME
stAbortThis, stThisTransaction - simple transaction handling
SYNOPSIS
#include <config.h> #include <sttk.h> void stAbortThis (int domsg); struct stTransactionstThisTransaction;
DESCRIPTION
stAbortThis is part of a simple transaction mechanism on the basis of setjmp(3) and longjmp(3). A transacion is started by setting a return point calling setjmp(3) and may be aborted by calling stAbortThis. This outputs a short abort message, cleans up the temporary files (stRm- RegisteredFiles(3)) and performs a longjmp(3) operation, returning to the transaction start point. The structure variable stThisTransaction carries information about the current transaction. It has the following fields: struct stTransaction { char tr_fname[MAXPATHLEN+1]; int tr_done; int tr_seqno; int tr_rc; jmp_buf tr_env; }; When setting the transaction return point by calling setjmp(3) the tr_env field must be used as argument to setjmp. The name of the con- cerned file should be stored in tr_fname field and the tr_done flag should be cleared. tr_seqno is the serial number of the current trans- action and must be increased at the beginning of each new transaction. The tr_rc return code can be set to an appropriate return code when something went wrong and the transaction was aborted. When not set by the application, tr_rc will be set nun null by stAbortThis on abor- tion of the transaction. On successful completion, tr_done should be set TRUE.
SEE ALSO
stRmRegisteredFiles(3), setjmp(3), longjmp(3). sttk-1.7 Thu Jun 24 17:43:37 1993 sttransaction(3)
Related Man Pages
sttkintro(3) - php
sttkintro(3) - centos
sttkintro(3) - mojave
sttkintro(3) - opensolaris
sttkintro(3) - xfree86
Similar Topics in the Unix Linux Community
Free() - Program getting aborted.