/* * Copyright 1995, 1996 Perforce Software. All rights reserved. * * This file is part of Perforce - the FAST SCM System. */ /* * Signaler.h - catch ^C and delete temp files * * A single Signaler is declared globally. * * Public methods: * * Signaler::Block() -- don't catch the signal until Catch() * Signaler::Catch() -- catch and handle SIGINT * Signaler::OnIntr() -- call a designated function on SIGINT * Signaler::DeleteOnIntr() -- undo OnIntr() call * * Signaler::Intr() -- call functions registered by OnIntr() * * Requires cooperation from the TempFile objects to delete files. */ # ifdef OS_NT typedef void *HANDLE; # endif struct SignalMan; typedef void (*SignalFunc)( void *ptr ); class Signaler { public: Signaler(); ~Signaler(); void Block(); void Catch(); void Disable(); void OnIntr( SignalFunc callback, void *ptr ); void DeleteOnIntr( void *ptr ); void Intr(); private: SignalMan *list; int disable; # ifdef OS_NT HANDLE hmutex; # endif // OS_NT } ; extern Signaler signaler;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 19358 | AnnaTito |
Populate -o //guest/perforce_software/p4connect/... //guest/AnnaTito/dev/p4connect/.... |
||
//guest/perforce_software/p4connect/main/src/P4Bridge/p4api/include/p4/signaler.h | |||||
#1 | 16209 | Norman Morse | Move entire source tree into "main" branch so workshop code will act correctly. | ||
//guest/perforce_software/p4connect/src/P4Bridge/p4api/include/p4/signaler.h | |||||
#2 | 12135 | Norman Morse |
Integrate dev branch changes into main. This code is the basiis of the 2.7 BETA release which provides Unity 5 compatibility |
||
#1 | 10940 | Norman Morse |
Inital Workshop release of P4Connect. Released under BSD-2 license |