projects
/
onak.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Try to load backends from current dir if none specified.
[onak.git]
/
add.c
diff --git
a/add.c
b/add.c
index 46f5ecf1e926a1553e06320b15acc4b9e40ab65e..167e5bd46aa13a0380fcd8e288eecce19f2cb478 100644
(file)
--- a/
add.c
+++ b/
add.c
@@
-23,7
+23,6
@@
#include "merge.h"
#include "onak-conf.h"
#include "parsekey.h"
#include "merge.h"
#include "onak-conf.h"
#include "parsekey.h"
-#include "sendsync.h"
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
@@
-69,8
+68,13
@@
int main(int argc, char *argv[])
count);
printf("Storing %d keys.\n", count);
end_html();
count);
printf("Storing %d keys.\n", count);
end_html();
- fclose(stdout);
- fclose(stderr);
+ if (stdout != NULL && fileno(stdout) != -1) {
+ fclose(stdout);
+ }
+ if (stderr != NULL && stderr != stdout &&
+ fileno(stderr) != -1) {
+ fclose(stderr);
+ }
catchsignals();
initdb(false);
catchsignals();
initdb(false);