init.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/init.c b/init.c
index 84cb2d2..68b5582 100644
--- a/init.c
+++ b/init.c
@@ -570,8 +570,14 @@ static int parse_jobs_ini(char *file, int stonewall_flag)
char *p;
int ret = 0, stonewall;
int first_sect = 1;
+ int close_file = 1;
- f = fopen(file, "r");
+ if (!strcmp(file, "-")) {
+ f = stdin;
+ close_file = 0;
+ }
+ else
+ f = fopen(file, "r");
if (!f) {
perror("fopen job file");
return 1;
@@ -665,7 +671,8 @@ static int parse_jobs_ini(char *file, int stonewall_flag)
free(string);
free(name);
- fclose(f);
+ if (close_file)
+ fclose(f);
return ret;
}
-- 1.5.1.6Received on Thu Sep 27 2007 - 08:41:52 CEST
This archive was generated by hypermail 2.2.0 : Thu Sep 27 2007 - 09:00:02 CEST