-rw-r--r-- | core/opiealarm/opiealarm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/opiealarm/opiealarm.c b/core/opiealarm/opiealarm.c index 998cabd..90a743f 100644 --- a/core/opiealarm/opiealarm.c +++ b/core/opiealarm/opiealarm.c @@ -92,8 +92,9 @@ int fork_with_pidfile ( void ) else if ( pid < 0 ) { perror ( "forking failed" ); return 0; } + // sleep( 60 ); // child process needs to react to SIGUSR2. This is sent when // a new opiealarm process is started. @@ -205,9 +206,9 @@ int main ( int argc, char **argv ) int suspend ( int fix_rtc ) { - FILE *fp; + FILE *fp = NULL; char buf [64]; time_t alrt, syst, rtct; struct tm alr, sys, rtc; int fd; @@ -257,9 +258,9 @@ int suspend ( int fix_rtc ) if ( !fgets ( buf, sizeof( buf ) - 1, fp )) break; // ( 1, TIMEFILE ); fclose ( fp ); - fp = 0; + fp = NULL; alrt = atoi ( buf ); // get the alarm time if ( alrt == 0 ) @@ -370,9 +371,9 @@ int resume ( int resuspend ) setenv ( "QTDIR", "/opt/QtPalmtop", 1 ); remove_pidfile ( ); - // no need for system() since this process is no longer usefull anyway + // no need for system() since this process is no longer usefull anyway execv ( "/opt/QtPalmtop/bin/qcop", argv ); perror ( "exec for qcop failed" ); return 5; |