<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/gen/exec.c, branch release/3.3.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>1999-09-16T08:26:13+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>1999-09-16T08:26:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5be28542797ac26e17de490f50e0830003596d38'/>
<id>5be28542797ac26e17de490f50e0830003596d38</id>
<content type='text'>
'RELENG_3_3_0_RELEASE'.

This commit was manufactured to restore the state of the 3.3-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_3_3_0_RELEASE'.

This commit was manufactured to restore the state of the 3.3-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
</pre>
</div>
</content>
</entry>
<entry>
<title>$Id$ -&gt; $FreeBSD$</title>
<updated>1999-08-29T14:49:43+00:00</updated>
<author>
<name>Peter Wemm</name>
<email>peter@FreeBSD.org</email>
</author>
<published>1999-08-29T14:49:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f376ef90540b4d5b6e7f467620e91404ba306d89'/>
<id>f376ef90540b4d5b6e7f467620e91404ba306d89</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix style issues in execl(), and make execle() vfork()-safe.</title>
<updated>1998-10-15T17:14:15+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>1998-10-15T17:14:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=af806462dc8cadb926b382e595fe95cf91a12f98'/>
<id>af806462dc8cadb926b382e595fe95cf91a12f98</id>
<content type='text'>
Reviewed by:	bde
Approved by:	jkh
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	bde
Approved by:	jkh
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct braino in previous commit. I get the pointy hat again.</title>
<updated>1998-10-14T20:23:40+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>1998-10-14T20:23:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7ea577e550d414341bd84d7bed58f938d48f3c13'/>
<id>7ea577e550d414341bd84d7bed58f938d48f3c13</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make execl() vfork()-safe. This should fix potential bugs in rcp,</title>
<updated>1998-10-14T18:53:36+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>1998-10-14T18:53:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=dea625c8721c5a896b6d2e8c5209fc6ef4802f01'/>
<id>dea625c8721c5a896b6d2e8c5209fc6ef4802f01</id>
<content type='text'>
telnet and tip, and probably a few other apps.

Reviewed by:	bde
Approved by:	jkh
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
telnet and tip, and probably a few other apps.

Reviewed by:	bde
Approved by:	jkh
</pre>
</div>
</content>
</entry>
<entry>
<title>stat() the correct file in execvp() so that the fine tuned errno handling</title>
<updated>1997-11-20T15:09:38+00:00</updated>
<author>
<name>Bruce Evans</name>
<email>bde@FreeBSD.org</email>
</author>
<published>1997-11-20T15:09:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=70df31a6274f347a0bf3a5ee114a24ef103fde19'/>
<id>70df31a6274f347a0bf3a5ee114a24ef103fde19</id>
<content type='text'>
actually works.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
actually works.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed searching of $PATH in execvp().  Do what sh(1) should do according</title>
<updated>1997-10-14T07:23:16+00:00</updated>
<author>
<name>Bruce Evans</name>
<email>bde@FreeBSD.org</email>
</author>
<published>1997-10-14T07:23:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1df595f25dae340c439be4d028cbb72a0894e1a6'/>
<id>1df595f25dae340c439be4d028cbb72a0894e1a6</id>
<content type='text'>
to POSIX.2.  In particular:

- don't retry for ETXTBSY.  This matches what sh(1) does.  The retry code
  was broken anyway.  It only slept for several seconds for the first few
  retries.  Then it retried without sleeping.
- don't abort the search for errors related to the path prefix, in
  particular for ENAMETOOLONG, ENOTDIR, ELOOP.  This fixes PR1487.  sh(1)
  gets this wrong in the opposite direction by never aborting the search.
- don't confuse EACCES for errors related to the path prefix with EACCES
  for errors related to the file.  sh(1) gets this wrong.
- don't return a stale errno when the search terminates normally without
  finding anything.  The errno for the last unsuccessful execve() was
  usually returned.  This gave too much precedence to pathologies in the
  last component of $PATH.  This bug is irrelevant for sh(1).

The implementation still uses the optimization/race-inhibitor of trying
to execve() things first.  POSIX.2 seems to require looking at file
permissions using stat().  We now use stat() after execve() if execve()
fails with an ambiguous error.  Trying execve() first may actually be a
pessimization, since failing execve()s are fundamentally a little slower
than stat(), and are significantly slower when a file is found but has
unsuitable permissions or points to an unsuitable interpreter.

PR:		1487
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to POSIX.2.  In particular:

- don't retry for ETXTBSY.  This matches what sh(1) does.  The retry code
  was broken anyway.  It only slept for several seconds for the first few
  retries.  Then it retried without sleeping.
- don't abort the search for errors related to the path prefix, in
  particular for ENAMETOOLONG, ENOTDIR, ELOOP.  This fixes PR1487.  sh(1)
  gets this wrong in the opposite direction by never aborting the search.
- don't confuse EACCES for errors related to the path prefix with EACCES
  for errors related to the file.  sh(1) gets this wrong.
- don't return a stale errno when the search terminates normally without
  finding anything.  The errno for the last unsuccessful execve() was
  usually returned.  This gave too much precedence to pathologies in the
  last component of $PATH.  This bug is irrelevant for sh(1).

The implementation still uses the optimization/race-inhibitor of trying
to execve() things first.  POSIX.2 seems to require looking at file
permissions using stat().  We now use stat() after execve() if execve()
fails with an ambiguous error.  Trying execve() first may actually be a
pessimization, since failing execve()s are fundamentally a little slower
than stat(), and are significantly slower when a file is found but has
unsuitable permissions or points to an unsuitable interpreter.

PR:		1487
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed execvp() of an empty pathname to fail POSIXly.  Previously it</title>
<updated>1996-11-18T19:24:47+00:00</updated>
<author>
<name>Bruce Evans</name>
<email>bde@FreeBSD.org</email>
</author>
<published>1996-11-18T19:24:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=766631018fb28b0bceac3fb57712fffd8a61c42f'/>
<id>766631018fb28b0bceac3fb57712fffd8a61c42f</id>
<content type='text'>
attempted to exec the components of $PATH and it usually set errno
to the wrong value.

Found by:	NIST PCTS
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
attempted to exec the components of $PATH and it usually set errno
to the wrong value.

Found by:	NIST PCTS
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed uninitialized variables for the '/'-in-pathname case in execvp().</title>
<updated>1996-11-18T16:56:51+00:00</updated>
<author>
<name>Bruce Evans</name>
<email>bde@FreeBSD.org</email>
</author>
<published>1996-11-18T16:56:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1ad652a54c103dbdd891e81ceedae09ade0c3f45'/>
<id>1ad652a54c103dbdd891e81ceedae09ade0c3f45</id>
<content type='text'>
Garbage in `eacces' caused the wrong errno to be set for non-EACCES errors.
Garbage in `etxtbsy' caused a semi-random retry strategy for ETXTBSY errors.

Found by:	NIST-PCTS.  gcc -Wall reported the problem, but -Wall is not
		enabled for libc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Garbage in `eacces' caused the wrong errno to be set for non-EACCES errors.
Garbage in `etxtbsy' caused a semi-random retry strategy for ETXTBSY errors.

Found by:	NIST-PCTS.  gcc -Wall reported the problem, but -Wall is not
		enabled for libc.
</pre>
</div>
</content>
</entry>
<entry>
<title>General -Wall warning cleanup, part I.</title>
<updated>1996-07-12T18:57:58+00:00</updated>
<author>
<name>Jordan K. Hubbard</name>
<email>jkh@FreeBSD.org</email>
</author>
<published>1996-07-12T18:57:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=51295a4d3e4c551df85249433c490208dc7fd23d'/>
<id>51295a4d3e4c551df85249433c490208dc7fd23d</id>
<content type='text'>
Submitted-By: Kent Vander Velden &lt;graphix@iastate.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Submitted-By: Kent Vander Velden &lt;graphix@iastate.edu&gt;
</pre>
</div>
</content>
</entry>
</feed>
