View | Details | Raw Unified | Return to bug 40572
Collapse All | Expand All

(-)lib/libutil/pw_util.c (+11 lines)
Lines 291-296 Link Here
291
	struct stat st1, st2;
291
	struct stat st1, st2;
292
	const char *editor;
292
	const char *editor;
293
	int pstat;
293
	int pstat;
294
	int ret_code;
294
295
295
	if ((editor = getenv("EDITOR")) == NULL)
296
	if ((editor = getenv("EDITOR")) == NULL)
296
		editor = _PATH_VI;
297
		editor = _PATH_VI;
Lines 343-348 Link Here
343
	sigaction(SIGINT, &sa_int, NULL);
344
	sigaction(SIGINT, &sa_int, NULL);
344
	sigaction(SIGQUIT, &sa_quit, NULL);
345
	sigaction(SIGQUIT, &sa_quit, NULL);
345
	sigprocmask(SIG_SETMASK, &oldsigset, NULL);
346
	sigprocmask(SIG_SETMASK, &oldsigset, NULL);
347
348
	ret_code = WEXITSTATUS(pstat);
349
	if ( ret_code != 0) {
350
		/* Program finished abnormally */
351
		editpid = -1;
352
		fprintf(stderr, "'%s' failed with error code %d: %s\n", editor,
353
				ret_code, strerror(ret_code));
354
		return (0);
355
	}
356
346
	if (stat(tempname, &st2) == -1)
357
	if (stat(tempname, &st2) == -1)
347
		return (-1);
358
		return (-1);
348
	return (st1.st_mtim.tv_sec != st2.st_mtim.tv_sec ||
359
	return (st1.st_mtim.tv_sec != st2.st_mtim.tv_sec ||

Return to bug 40572