summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -93,5 +93,5 @@ int fork_with_pidfile ( void )
perror ( "forking failed" );
return 0;
- }
+ }
// child process needs to react to SIGUSR2. This is sent when
@@ -259,4 +259,5 @@ int suspend ( int fix_rtc )
fclose ( fp );
+ fp = 0;
alrt = atoi ( buf ); // get the alarm time
@@ -287,4 +288,5 @@ int suspend ( int fix_rtc )
close ( fd );
+ fd = -1;
remove_pidfile ( );