DragonFly BSD
DragonFly commits List (threaded) for 2005-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/usr.sbin/vipw pw_util.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Dec 2005 12:18:56 -0800 (PST)

dillon      2005/12/26 12:18:56 PST

DragonFly src repository

  Modified files:
    usr.sbin/vipw        pw_util.c 
  Log:
  A ^Z signals the whole process group, causing the parent process (vipw) to
  return a stopped status for the child AND to go to sleep at the same time.
  
  Originally the parent (vipw) stopped before it checked the child state, and
  thus would not 'notice' the child going into a stopped state because the
  parent would get interrupted by the SIGCONT, execute the wakeup of the
  child (vi), then restart the wait*().
  
  But now due to the fact that the process no longer enters a STOPPED
  state until it actually tries to return to userland, the wait*() call will
  in fact try to return the child's 'old' stopped state when both processes
  are stopped with TSTP, then return it when the parent process is woken up
  by the SIGCONT.
  
  For now solve the problem by not trying to check the stopped status of
  the child.
  
  Reported-by: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
  
  Revision  Changes    Path
  1.5       +4 -3      src/usr.sbin/vipw/pw_util.c


http://www.dragonflybsd.org/cvsweb/src/usr.sbin/vipw/pw_util.c.diff?r1=1.4&r2=1.5&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]