author | kergoth <kergoth> | 2002-09-05 18:56:37 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-09-05 18:56:37 (UTC) |
commit | 3b604a204719a4b45360a9d8685d4bb51a32b9dd (patch) (side-by-side diff) | |
tree | bb47316b888c038a0c07373df93e8b2cc853777a | |
parent | 45c33b69ae0eec4868a312dc7eb9f496e10588bd (diff) | |
download | opie-3b604a204719a4b45360a9d8685d4bb51a32b9dd.zip opie-3b604a204719a4b45360a9d8685d4bb51a32b9dd.tar.gz opie-3b604a204719a4b45360a9d8685d4bb51a32b9dd.tar.bz2 |
Use SIG_IGN rather than an empty handler to ignore SIG_TSTP.
-rw-r--r-- | libopie/odevice.cpp | 8 | ||||
-rw-r--r-- | libopie/odevice.h | 2 |
2 files changed, 1 insertions, 9 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 6572fb6..1da8862 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -128,31 +128,25 @@ ODevice::~ODevice ( ) //#include <linux/apm_bios.h> //#define APM_IOC_SUSPEND _IO('A',2) #define APM_IOC_SUSPEND (( 0<<30 ) | ( 'A'<<8 ) | ( 2 ) | ( 0<<16 )) - -void ODevice::tstp_sighandler ( int ) -{ -} - - bool ODevice::suspend ( ) { if ( d-> m_model == OMODEL_Unknown ) // better don't suspend in qvfb / on unkown devices return false; int fd; bool res = false; if ((( fd = ::open ( "/dev/apm_bios", O_RDWR )) >= 0 ) || (( fd = ::open ( "/dev/misc/apm_bios",O_RDWR )) >= 0 )) { struct timeval tvs, tvn; - ::signal ( SIGTSTP, tstp_sighandler ); // we don't want to be stopped + ::signal ( SIGTSTP, SIG_IGN ); // we don't want to be stopped ::gettimeofday ( &tvs, 0 ); res = ( ::ioctl ( fd, APM_IOC_SUSPEND ) == 0 ); // tell the kernel to "start" suspending ::close ( fd ); if ( res ) { diff --git a/libopie/odevice.h b/libopie/odevice.h index cda504a..5009b91 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h @@ -99,13 +99,11 @@ protected: virtual void init ( ); ODeviceData *d; private: ODevice ( const ODevice & ); - - static void tstp_sighandler ( int ); }; #endif |