[Pkg-shadow-commits] r279 - trunk/debian/patches

Alexander Gattin pkg-shadow-devel@lists.alioth.debian.org
Mon, 20 Jun 2005 20:48:57 +0000


Author: xrgtn-guest
Date: 2005-06-20 20:48:57 +0000 (Mon, 20 Jun 2005)
New Revision: 279

Modified:
   trunk/debian/patches/356_su-stop_cont-proxy
Log:
Made comment more clean and replaced mention of kill(SIGSTOP), which was wrong, with raise(SIGSTOP) which is true.


Modified: trunk/debian/patches/356_su-stop_cont-proxy
===================================================================
--- trunk/debian/patches/356_su-stop_cont-proxy	2005-06-20 20:39:42 UTC (rev 278)
+++ trunk/debian/patches/356_su-stop_cont-proxy	2005-06-20 20:48:57 UTC (rev 279)
@@ -1,23 +1,24 @@
 Goal:	When su process sits between parent and child shells, it should
-	pass STOPs from child to parent and CONTs from parent to child.
+	propagate STOPs from child to parent and CONTs from parent to child.
 
-Status wrt upstream: Fixed in upstream same way, with slightly different code
-	in run_shell(), since 4.0.5
+Status wrt upstream: Fixed in upstream the same way, with slightly different
+	code inside run_shell(), since 4.0.5
 
 Notes:	SIGCHLD is handled implicitly by waitpid() when WUNTRACED flag is
 	specified.
 	
-	SIGCONT just resumes execution of "su" right after the point where
-	it was stopped -- i.e. starting from the next command after
-	kill(SIGSTOP), which has been processed synchronously.
+	SIGCONT is handled implicitly too, because it just resumes execution
+	right after the point the code has been stopped -- in our case it's
+	the next command after "raise(SIGSTOP)", which has been processed
+	_synchronously_.
 	
 	Thus there's no need to set signal handlers for either SIGCHLD or
 	SIGCONT, and code is much cleaner with this.
 	
 	Because waitpid() is now placed inside a loop, here are some comments
 	about when the loop is broken:
-	1. (wpid != pid && errno != EINTR) -- waitpid(pid, ...) error like
-	   wrong pid, options, but excluding interrupted by signal case
+	1. (wpid != pid && errno != EINTR) -- when waitpid() returns any error
+	   except "interrupted by signal", i.e. wrong pid, wrong options etc.
 	2. WIFEXITED
 	3. WIFSIGNALED
 	4. WCOREDUMP