Project

General

Profile

Revision 1ebf1cde birq.c

View differences:

birq.c
130 130
		if ((pidfd = open(opts->pidfile,
131 131
			O_WRONLY | O_CREAT | O_EXCL | O_TRUNC,
132 132
			S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) {
133
			syslog(LOG_WARNING, "Can't open pidfile %s: %s",
133
			syslog(LOG_WARNING, "Can't open pidfile %s: %s\n",
134 134
				opts->pidfile, strerror(errno));
135 135
		} else {
136 136
			char str[20];
137 137
			snprintf(str, sizeof(str), "%u\n", getpid());
138 138
			str[sizeof(str) - 1] = '\0';
139 139
			if (write(pidfd, str, strlen(str)) < 0)
140
				syslog(LOG_WARNING, "Can't write to %s: %s",
140
				syslog(LOG_WARNING, "Can't write to %s: %s\n",
141 141
					opts->pidfile, strerror(errno));
142 142
			close(pidfd);
143 143
		}
......
205 205
			printf("----[ %s ]----------------------------------------------------------------\n", outstr);
206 206
		}
207 207

  
208
		/* Re-read config file on SIGHUP */
209
		if (sighup) {
210
			if (!access(opts->cfgfile, R_OK)) {
211
				syslog(LOG_ERR, "Re-reading config file\n");
212
				if (parse_config(opts->cfgfile, opts))
213
					syslog(LOG_ERR, "Error while config file parsing.\n");
214
			} else if (opts->cfgfile_userdefined)
215
				syslog(LOG_ERR, "Can't find config file.\n");
216
			sighup = 0;
217
		}
218

  
208 219
		/* Rescan PCI devices for new IRQs. */
209 220
		scan_irqs(irqs, balance_irqs, pxms);
210 221
		if (opts->verbose)

Also available in: Unified diff