Reputation: 3900
I am writing daemon application for Debian Sid. It works perfectly most of the times, but dies silently after i put my laptop to suspend (or hibernate). So i have a couple of questions:
Upvotes: 3
Views: 262
Reputation: 3900
Daemon's loop was on blocking read call, and suspend (hibernate) interrupts it. So, should check errnos more accurately.
Fixed by adding:
if ( errno == EINTR ) continue;
Upvotes: 0
Reputation: 47770
Try strace
-ing the daemon to see what is the reason it dies silently. Generally, suspend/hibernate alone should have no effect on user processes.
Upvotes: 1