etc_changed, passwd & group

Pierre A. Humblet Pierre.Humblet@ieee.org
Sun Jan 19 00:23:00 GMT 2003


At 06:49 PM 1/18/2003 -0500, Christopher Faylor wrote:
>
>I think I have it fixed in my current sources.  Don't bother.
>
OK, thanks. A thought came to my mind. The current code (as of
last night) was relying on pw_idx starting at 0, and then playing
tricks with subtracting and adding 1. But the same information
is already contained in state (as it should).

If we relied on the state we could put in load ()
if (state != loaded)
   pwd_ix = init ()
without any argument nor +/-1 anywhere. Inside init() 
sawchange[curr_ix] can safely be set to true. 
init() acts as an open(), as you had kind of said. 

Pierre




More information about the Cygwin-patches mailing list