delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/31/12:57:55

X-Spam-Check-By: sourceware.org
Date: Tue, 31 Jan 2006 12:57:46 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Martin <linkscrazy AT yahoo DOT com>
cc: cygwin AT cygwin DOT com
Subject: RE: 1.5.19-4 exec family of functions find wrong file to execute
In-Reply-To: <20060131162307.61202.qmail@web30614.mail.mud.yahoo.com>
Message-ID: <Pine.GSO.4.63.0601311242240.2407@access1.cims.nyu.edu>
References: <20060131162307 DOT 61202 DOT qmail AT web30614 DOT mail DOT mud DOT yahoo DOT com>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Ugh, top-posting...  Reformatted.

On Tue, 31 Jan 2006, Martin wrote:

> --- Igor Peshansky <pechtcha AT XX DOT XXX DOT XXX> wrote:

<http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.

> > On Tue, 31 Jan 2006, Dave Korn wrote:
> >
> > > On 30 January 2006 19:23, Martin wrote:
> > >
> > > > Any response?
> > > > TIA
> > > > --- Martin <linkscrazy AT yahoo.!> wrote:
> > > >
> > > >> I am attempting to invoke a command with execvp/execlp.  If a
> > > >> file appears in my PATH before the executable desired and has the
> > > >> same name as the executable, the first occurrence of the file
> > > >> name is used as the executable to invoke.  Even though the first
> > > >> file is NOT marked as executable.
> > >
> > > >> Is this normal behavior for execlp/execvp?
> > > >> Shouldn't the execution permission be set in order to execute it?
> > >
> > >   Depends on your mountpoints.  If the file is found under a
> > > mountpoint with the cygexec flag set, it will be assumed to be
> > > executable regardless of the x bit in the file's perms.
> >
> > Also, on FAT filesystems, there are no permission bits[*]...  Your
> > file may be tripping the executable file detection heuristics, though.
> > 	Igor
> > [*] Cygwin can simulate them for you on pure FAT with "ntea", but with
> > FAT32 you're SOL.
>
> In response to your comments:
> I ran the testcase from ~/testcases directory. I believe my cygwin.out
> file indicates /home is mounted from D:\home (HOME=/home/test). Also,
> D: is NTFS.  Also, there is nothing special about mount point (no -x
> flag was used).  This is all shown in cygwin.out.

Then you'll just have to run this under strace, and see why it selects
that file to execute.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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