/* * 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 | 18760 | rlranft |
Populate -o //guest/perforce_software/p4/... //guest/rlranft/p4/.... |
||
//guest/perforce_software/p4/2014-2/sys/signaler.h | |||||
#1 | 15903 | Matt Attaway | Everything should be happy now between the Workshop and the depot paths | ||
//guest/perforce_software/p4/2014_2/sys/signaler.h | |||||
#1 | 15901 | Matt Attaway | Clean up code to fit modern Workshop naming standards | ||
//guest/perforce_software/p4/2014.2/sys/signaler.h | |||||
#1 | 12189 | Matt Attaway | Initial (and much belated) drop of 2014.2 p4 source code |