summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/opiealarm/opiealarm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/opiealarm/opiealarm.c b/core/opiealarm/opiealarm.c
index 072dca7..465e633 100644
--- a/core/opiealarm/opiealarm.c
+++ b/core/opiealarm/opiealarm.c
@@ -91,9 +91,9 @@ int fork_with_pidfile ( void )
91 } 91 }
92 else if ( pid < 0 ) { 92 else if ( pid < 0 ) {
93 perror ( "forking failed" ); 93 perror ( "forking failed" );
94 return 0; 94 return 0;
95 } 95 }
96 96
97 // child process needs to react to SIGUSR2. This is sent when 97 // child process needs to react to SIGUSR2. This is sent when
98 // a new opiealarm process is started. 98 // a new opiealarm process is started.
99 99
@@ -257,8 +257,9 @@ int suspend ( int fix_rtc )
257 if ( !fgets ( buf, sizeof( buf ) - 1, fp )) 257 if ( !fgets ( buf, sizeof( buf ) - 1, fp ))
258 break; // ( 1, TIMEFILE ); 258 break; // ( 1, TIMEFILE );
259 259
260 fclose ( fp ); 260 fclose ( fp );
261 fp = 0;
261 262
262 alrt = atoi ( buf ); // get the alarm time 263 alrt = atoi ( buf ); // get the alarm time
263 264
264 if ( alrt == 0 ) 265 if ( alrt == 0 )
@@ -285,8 +286,9 @@ int suspend ( int fix_rtc )
285 if ( ioctl ( fd, RTC_AIE_OFF, 0 ) < 0 ) // disable RTC alarm irq 286 if ( ioctl ( fd, RTC_AIE_OFF, 0 ) < 0 ) // disable RTC alarm irq
286 break; // ( 1, "ioctl RTC_AIE_OFF" ); 287 break; // ( 1, "ioctl RTC_AIE_OFF" );
287 288
288 close ( fd ); 289 close ( fd );
290 fd = -1;
289 291
290 remove_pidfile ( ); 292 remove_pidfile ( );
291 293
292 return 0; 294 return 0;