* src/vipw.c, src/su.c, src/newgrp.c: Harmonize the children's

SIGSTOP handling. Raise the signal which stopped the child instead
	of always SIGSTOP.

	Import Debian patch 406_vipw_resume_properly.
	Thanks to Dean Gaudet.
	* NEWS, src/vipw.c: Resume properly after ^Z.
This commit is contained in:
nekral-guest
2008-05-18 13:41:56 +00:00
parent c7302b61ef
commit 6a17c2b27f
5 changed files with 26 additions and 7 deletions

View File

@@ -294,7 +294,7 @@ static void syslog_sg (const char *name, const char *group)
pid = waitpid (child, &cst, WUNTRACED);
if (pid == child && WIFSTOPPED (cst)) {
/* stop when child stops */
raise (SIGSTOP);
kill (getpid (), WSTOPSIG(status));
/* wake child when resumed */
kill (child, SIGCONT);
}