Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 24 Aug 2005 23:17:17 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: please try latest snapshot Message-ID: <20050825031717.GB16840@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com References: <082420051805 DOT 10982 DOT 430CB6EB0002BBE400002AE622064246130A050E040D0C079D0A AT comcast DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <082420051805.10982.430CB6EB0002BBE400002AE622064246130A050E040D0C079D0A@comcast.net> User-Agent: Mutt/1.5.8i On Wed, Aug 24, 2005 at 06:05:31PM +0000, Eric Blake wrote: >I'm having a problem with the 20050824 snapshot. execl() and friends >are in violation of POSIX, which requires EACCESS (pathname is not >regular file and cannot be executed) or ENOEXEC (pathname is not >executable image, although it has execute permissions), rather than >ENOENT, when passed a directory. ENOENT is only allowed for path >resolution failures. Solaris 8 returns EACCESS on directories. > >The invalid errno from exec*() breaks, among others, xargs(1), which >mistakenly exits with 127 instead of 126 (caught by the findutils >testsuite, since I am waiting to package findutils-4.2.25 once it >is released upstream). > >$ cat foo.c >#include >#include >#include >#include > >int >main (int argc, char** argv) >{ > int err; > if (argc != 2) > { > printf("Usage: foo \n"); > return 1; > } > err = execl(argv[1], argv[1], NULL); > printf("execl failed with %d, errno %d:%s\n", err, errno, strerror(errno)); > return 0; >} >$ ./foo / >execl failed with -1, errno 2:No such file or directory >$ ./foo . >execl failed with -1, errno 2:No such file or directory >$ ./foo '' >execl failed with -1, errno 2:No such file or directory >$ xargs / < /dev/null; echo $? >xargs: /: No such file or directory >127 > ># on solaris 8: >% ./foo / >execl failed with -1, errno 13:Permission denied >% ./foo . >execl failed with -1, errno 13:Permission denied >% ./foo '' >execl failed with -1, errno 2:No such file or directory >% xargs / < /dev/null; echo $? >xargs: /: Permission denied >126 This isn't really a snapshot regression. 1.5.18 works the same way, AFAICT. The latest snapshot should rectify this behavior, however. cgf -- 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/