2 * Copyright 1995, 1996 Perforce Software. All rights reserved.
4 * This file is part of Perforce - the FAST SCM System.
8 * Signaler.h - catch ^C and delete temp files
10 * A single Signaler is declared globally.
14 * Signaler::Block() -- don't catch the signal until Catch()
15 * Signaler::Catch() -- catch and handle SIGINT
16 * Signaler::OnIntr() -- call a designated function on SIGINT
17 * Signaler::DeleteOnIntr() -- undo OnIntr() call
19 * Signaler::Intr() -- call functions registered by OnIntr()
21 * Requires cooperation from the TempFile objects to delete files.
30 typedef void (*SignalFunc
)( void *ptr
);
40 void OnIntr( SignalFunc callback
, void *ptr
);
41 void DeleteOnIntr( void *ptr
);
55 extern Signaler signaler
;