delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/10/21/20:35:07

From: fujieda AT jaist DOT ac DOT jp (Kazuhiro Fujieda)
Subject: Re: handling file attributes
21 Oct 1998 20:35:07 -0700 :
Message-ID: <uvhldxq86.fsf.cygnus.cygwin32.developers@parvati.will.or.jp>
References: <3627056A DOT 1BD34CC4 AT jaist DOT ac DOT jp>
Mime-Version: 1.0 (generated by SEMI MIME-Edit 0.100 - "Shijima")
To: cygwin32-developers AT cygnus DOT com

>>> On Fri, 16 Oct 1998 17:35:54 +0900
>>> Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp> 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];

____
  | AIST      Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019