From: cgf AT cygnus DOT com (Christopher Faylor) Subject: Re: handling file attributes 22 Oct 1998 05:30:44 -0700 Message-ID: <19981022082333.A15745.cygnus.cygwin32.developers@cygnus.com> References: <3627056A DOT 1BD34CC4 AT jaist DOT ac DOT jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: Kazuhiro Fujieda , cygwin32-developers AT cygnus DOT com On Thu, Oct 22, 1998 at 11:52:41AM +0900, Kazuhiro Fujieda wrote: >>>> On Fri, 16 Oct 1998 17:35:54 +0900 >>>> Kazuhiro Fujieda said: > >> fhandler_disk_file::open doesn't check the magic number '#!' on NT. >> fhandler.cc:1075 >> if (!real_path.exec_p && os_being_run != winNT) >> >> When NTEA is enabled, this causes no problem by doing chmod +x. >> But when NTEA is disabled by default, I can't execute shell >> scripts having the same name as .exe files in another path. >> I think it should always check the magic number or not check >> only when NTEA is enabled. > >This problem isn't taken into account in the latest snapshot. >Can't you understand this problem by reason of my poor English ? >The easiest solution is to stop checking WinNT, same as >spawn_guts() in spawn.cc. > >--- fhandler.cc- Wed Oct 21 14:29:47 1998 >+++ fhandler.cc Thu Oct 22 11:06:29 1998 >@@ -1076,7 +1076,7 @@ > if (!res) > goto out; > >- if (!real_path.exec_p && os_being_run != winNT) >+ if (!real_path.exec_p) > { > DWORD done; > char magic[3]; I understood your original report but I really hate making this change. It causes a very noticeable performance loss. If you'd like to rework this so that it is only active when NTEA is not activated then I'll add that change. -chris