reading new stdin.
This change should:
Allowed editors such as 'gedit' which do not modify original
file, but which rename(2) a temp file to original, to be used
by crontab -e (bug 129170).
}
(void)signal(SIGHUP, SIG_DFL);
(void)signal(SIGINT, SIG_DFL);
- (void)signal(SIGQUIT, SIG_DFL);
- if (fstat(t, &statbuf) < 0) {
+ (void)signal(SIGQUIT, SIG_DFL);
+ if (stat(Filename, &statbuf) < 0) {
perror("fstat");
goto fatal;
}
goto remove;
}
fprintf(stderr, "%s: installing new crontab\n", ProgramName);
+ fclose(NewCrontab);
+ NewCrontab=fopen(Filename,"r+");
+ if( NewCrontab == 0L )
+ {
+ perror("fopen");
+ goto fatal;
+ }
switch (replace_cmd()) {
case 0:
break;