Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com To: cygwin-developers AT cygwin DOT com Subject: Re: [RFA] A kinder, gentler check for /etc/{passwd,group} changes References: <20010908225133 DOT A17336 AT redhat DOT com> <20010909152458 DOT D937 AT cygbert DOT vinschen DOT de> <1653247770 DOT 20010909175103 AT logos-m DOT ru> <20010909163444 DOT E937 AT cygbert DOT vinschen DOT de> <20010909121808 DOT B8059 AT redhat DOT com> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Kazuhiro Fujieda Date: 13 Sep 2001 01:49:32 +0900 In-Reply-To: Christopher Faylor's message of Sun, 9 Sep 2001 12:18:08 -0400 Message-ID: Lines: 54 X-Mailer: Gnus v5.3/Emacs 19.34 >>> On Sun, 9 Sep 2001 12:18:08 -0400 >>> Christopher Faylor said: > The /etc/passwd and /etc/group rereading was one of the big reasons why I > wanted to release 1.3.3. It will quiet some mailing list traffic. > > So, I'd like to get this into 1.3.3. But I've never enjoyed this feature. When I start vim and type `:w', it shows the following message and chokes up. ~ $ vim /etc/passwd Vim: Caught deadly signal SEGV You can get the strace log from the following URL. http://www.jaist.ac.jp/~fujieda/cygwin/vim.log.bz2 It shows: - vim wrote /etc/passwd successfully. - read_etc_passwd was invoked twice since the following message appears twice: _open: open (/etc/passwd, 0x20000) - The signal 11 is triggered just after the first invocation. I thought the following patch could solve this problem, but it didn't completely. I was able to modify /etc/passwd with vim and the patched cygwin1.dll, but bash hanged up when I typed a command just after vim terminated. You can get the strace log from the following URL. http://www.jaist.ac.jp/~fujieda/cygwin/bash.log.bz2 I invoked `touch /etc/passwd' and then `ls' in the log. I wasn't able to find the solution of the problem. Index: pwdgrp.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/pwdgrp.h,v retrieving revision 1.2 diff -u -p -r1.2 pwdgrp.h --- pwdgrp.h 2001/09/09 21:57:44 1.2 +++ pwdgrp.h 2001/09/12 16:15:30 @@ -26,7 +26,7 @@ public: pwdgrp_check () : state (uninitialized) {} operator pwdgrp_state () { - if (state != uninitialized && file_w32[0] && cygheap->etc_changed ()) + if (state == loaded && file_w32[0] && cygheap->etc_changed ()) { HANDLE h; WIN32_FIND_DATA data; ____ | AIST Kazuhiro Fujieda | HOKURIKU Center for Information Science o_/ 1990 Japan Advanced Institute of Science and Technology