diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-16 21:26:13 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-16 21:26:13 +0000 |
commit | da658e720570ba6f38b7607831c80fc9364b2787 (patch) | |
tree | 2d620b3fa606037788e2c4ae2d2a9373f2f75e71 /kdmlib/kdmtsak.cpp | |
parent | 7b1017d0013a2900b82cdf36bd2a9ef387c9aec5 (diff) | |
download | tdebase-da658e720570ba6f38b7607831c80fc9364b2787.tar.gz tdebase-da658e720570ba6f38b7607831c80fc9364b2787.zip |
Fix KDM shutdown dialog not appearing under Debian
Fix kdmtsak failure on tsak daemon exit
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1254046 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdmlib/kdmtsak.cpp')
-rw-r--r-- | kdmlib/kdmtsak.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kdmlib/kdmtsak.cpp b/kdmlib/kdmtsak.cpp index e1ed9ddc9..967e54855 100644 --- a/kdmlib/kdmtsak.cpp +++ b/kdmlib/kdmtsak.cpp @@ -40,18 +40,19 @@ int main (int argc, char *argv[]) } // Now wait for SAK press mPipe_fd = open(FIFO_FILE, O_RDONLY); - if (mPipe_fd > -1) { + while (mPipe_fd > -1) { numread = read(mPipe_fd, readbuf, 6); readbuf[numread] = 0; readbuf[127] = 0; - close(mPipe_fd); if (strcmp(readbuf, "SAK\n\r") == 0) { + close(mPipe_fd); return 0; } else { - return 1; + usleep(100); } } + close(mPipe_fd); return 6; } else { |