summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/odevice.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 1da8862..2f40731 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -148,7 +148,8 @@ bool ODevice::suspend ( )
+ ::sync ( ); // flush fs caches
+
res = ( ::ioctl ( fd, APM_IOC_SUSPEND ) == 0 ); // tell the kernel to "start" suspending
- ::close ( fd );
if ( res ) {
- ::kill ( -::getpid ( ), SIGTSTP ); // stop everthing in out process group
+ ::kill ( -::getpid ( ), SIGTSTP ); // stop everthing in our process group
@@ -162,2 +163,3 @@ bool ODevice::suspend ( )
+ ::close ( fd );
::signal ( SIGTSTP, SIG_DFL );