<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/bin/sh/error.h, branch releng/12.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2017-06-04T21:58:02Z</updated>
<entry>
<title>sh: Make sure to process SIGINT if SETINTON re-enables processing.</title>
<updated>2017-06-04T21:58:02Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2017-06-04T21:58:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8d4cde8e6d3ed2c4b4b76bba68639e116031925d'/>
<id>urn:sha1:8d4cde8e6d3ed2c4b4b76bba68639e116031925d</id>
<content type='text'>
If INTON re-enables interrupts, it processes any interrupt that occurred
while interrupts were disabled. Make SETINTON do the same.
</content>
</entry>
<entry>
<title>Renumber copyright clause 4</title>
<updated>2017-02-28T23:42:47Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2017-02-28T23:42:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fbbd9655e5107c68e4e0146ff22b73d7350475bc'/>
<id>urn:sha1:fbbd9655e5107c68e4e0146ff22b73d7350475bc</id>
<content type='text'>
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann &lt;jschauma@stevens.edu&gt;
Pull Request:	https://github.com/freebsd/freebsd/pull/96
</content>
</entry>
<entry>
<title>sh: Move some code from onint() to onsig(), making onint() noreturn.</title>
<updated>2014-12-21T23:09:59Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2014-12-21T23:09:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=85052e7b56c16d12d8c705c9347408852ee94758'/>
<id>urn:sha1:85052e7b56c16d12d8c705c9347408852ee94758</id>
<content type='text'>
As a result, the INTON macro which is used many times generates fewer
bytes of code.
</content>
</entry>
<entry>
<title>sh: Allow EV_EXIT through function calls, make {...} &lt;redir more consistent.</title>
<updated>2011-04-23T22:28:56Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2011-04-23T22:28:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=45496405c65570e322e098be643b98d69cee39e2'/>
<id>urn:sha1:45496405c65570e322e098be643b98d69cee39e2</id>
<content type='text'>
If EV_EXIT causes an exit, use the exception mechanism to unwind
redirections and local variables. This way, if the final command is a
redirected command, an EXIT trap now executes without the redirections.

Because of these changes, EV_EXIT can now be inherited by the body of a
function, so do so. This means that a function no longer prevents a fork
before an exec being skipped, such as in
  f() { head -1 /etc/passwd; }; echo $(f)

Wrapping a single builtin in a function may still cause an otherwise
unnecessary fork with command substitution, however.

An exit command or -e failure still invokes the EXIT trap with the
original redirections and local variables in place.

Note: this depends on SHELLPROC being gone. A SHELLPROC depended on
keeping the redirections and local variables and only cleaning up the
state to restore them.
</content>
</entry>
<entry>
<title>sh: Remove special code for shell scripts without magic number.</title>
<updated>2011-02-04T22:47:55Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2011-02-04T22:47:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3835f47c7e144fc73123f5d5706c6ec666cf3ae4'/>
<id>urn:sha1:3835f47c7e144fc73123f5d5706c6ec666cf3ae4</id>
<content type='text'>
These are called "shell procedures" in the source.

If execve() failed with [ENOEXEC], the shell would reinitialize itself
and execute the program as a script. This requires a fair amount of code
which is not frequently used (most scripts have a #! magic number).
Therefore just execute a new instance of sh (_PATH_BSHELL) to run the
script.
</content>
</entry>
<entry>
<title>sh: Add a function to print warnings (with command name and newline).</title>
<updated>2010-12-21T20:47:06Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2010-12-21T20:47:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5fe9123ff55b4772210b9e85a7f2408c9a81257e'/>
<id>urn:sha1:5fe9123ff55b4772210b9e85a7f2408c9a81257e</id>
<content type='text'>
This is like error() but without raising an exception.
It is particularly useful as a replacement for the warnx macro in
bltin/bltin.h.
</content>
</entry>
<entry>
<title>sh: Add some __dead2 to indicate functions that do not return.</title>
<updated>2009-12-24T20:55:14Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2009-12-24T20:55:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=95139d9d6a072308639b75e6146ff52c928cf0bd'/>
<id>urn:sha1:95139d9d6a072308639b75e6146ff52c928cf0bd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix various things about SIGINT handling:</title>
<updated>2009-11-22T18:23:30Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2009-11-22T18:23:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9922c6d2d5e3158b241cc5e4e638b4d3f6f6187a'/>
<id>urn:sha1:9922c6d2d5e3158b241cc5e4e638b4d3f6f6187a</id>
<content type='text'>
* exception handlers are now run with interrupts disabled, which avoids
  many race conditions
* fix some cases where SIGINT only aborts one command and continues the
  script, in particular if a SIGINT causes an EINTR error which trumped the
  interrupt.

Example:
  sh -c 'echo &lt; /some/fifo; echo This should not be printed'
The fifo should not have writers. When pressing ctrl+c to abort the open,
the shell used to continue with the next command.

Example:
  sh -c '/bin/echo &lt; /some/fifo; echo This should not be printed'
Similar. Note, however, that this particular case did not and does not work
in interactive mode with job control enabled.
</content>
</entry>
<entry>
<title>Remove clause 3 from the UCB licenses.</title>
<updated>2004-04-06T20:06:54Z</updated>
<author>
<name>Mark Murray</name>
<email>markm@FreeBSD.org</email>
</author>
<published>2004-04-06T20:06:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6195fb4102afbdfc3da8c0ac2e4cacb0f37d89a9'/>
<id>urn:sha1:6195fb4102afbdfc3da8c0ac2e4cacb0f37d89a9</id>
<content type='text'>
OK'ed by:	imp, core
</content>
</entry>
<entry>
<title>Convert the remaining callers of errmsg() to use strerror(), and remove</title>
<updated>2002-09-29T11:37:39Z</updated>
<author>
<name>Tim J. Robbins</name>
<email>tjr@FreeBSD.org</email>
</author>
<published>2002-09-29T11:37:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1c59560de9a5e6baf9bf9668e15a405c914772a0'/>
<id>urn:sha1:1c59560de9a5e6baf9bf9668e15a405c914772a0</id>
<content type='text'>
errmsg() and its table of error messages.
</content>
</entry>
</feed>
