<feed xmlns='http://www.w3.org/2005/Atom'>
<title>freebsd-src.git/lib/libc/tests/stdlib/system_test.c, branch main</title>
<subtitle>FreeBSD sources</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/freebsd-src.git/'/>
<entry>
<title>system(3): Fix brain glitch in previous commit</title>
<updated>2026-03-09T21:01:41+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-03-09T21:00:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/freebsd-src.git/commit/?id=863b5c137a98d29dc6964cba0e0c4fe2a8bebab8'/>
<id>863b5c137a98d29dc6964cba0e0c4fe2a8bebab8</id>
<content type='text'>
We were saving SIGINT twice instead of SIGINT and SIGQUIT.

Also restore original order of operations (SIGINT then SIGQUIT), which
matches the order in which they're discussed in the POSIX description
of system(3).

MFC after:	1 week
Sponsored by:	Klara, Inc.
Fixes:		48368f702423 ("system(3): Address test robustness issue")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were saving SIGINT twice instead of SIGINT and SIGQUIT.

Also restore original order of operations (SIGINT then SIGQUIT), which
matches the order in which they're discussed in the POSIX description
of system(3).

MFC after:	1 week
Sponsored by:	Klara, Inc.
Fixes:		48368f702423 ("system(3): Address test robustness issue")
</pre>
</div>
</content>
</entry>
<entry>
<title>system(3): Address test robustness issue</title>
<updated>2026-03-09T20:41:04+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-03-09T20:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/freebsd-src.git/commit/?id=48368f702423742b2a7dff7ad3191625e8bf26f0'/>
<id>48368f702423742b2a7dff7ad3191625e8bf26f0</id>
<content type='text'>
Don't assume that SIGINT and SIGQUIT are set to SIG_DFL at the start
of the test.  Instead, retrieve their current dispositions and verify
that they are restored at the end of the test.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55709
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't assume that SIGINT and SIGQUIT are set to SIG_DFL at the start
of the test.  Instead, retrieve their current dispositions and verify
that they are restored at the end of the test.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55709
</pre>
</div>
</content>
</entry>
<entry>
<title>system(3): Fix null case</title>
<updated>2026-02-25T21:12:42+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-25T21:12:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/freebsd-src.git/commit/?id=8ae3f44991948cc97b09adc248a9a46db71bf9e0'/>
<id>8ae3f44991948cc97b09adc248a9a46db71bf9e0</id>
<content type='text'>
Our manual page states that if given a null pointer, system() returns
non-zero if the shell is available and zero if it is not.  This is
consistent with the C standard's description of system(), but it is not
what we actually do.  What we actually do is always return non-zero, as
required by POSIX.

As the POSIX rationale explains, implementing the logic required by the
C standard does not violate POSIX, since a conforming system always has
a shell, therefore the logic will always return non-zero.

Since our libc is commonly used in non-conforming situations such as
chroots or thin jails, we should implement the full logic required by
the C standard.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	obiwac, bnovkov, kevans
Differential Revision:	https://reviews.freebsd.org/D55484
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our manual page states that if given a null pointer, system() returns
non-zero if the shell is available and zero if it is not.  This is
consistent with the C standard's description of system(), but it is not
what we actually do.  What we actually do is always return non-zero, as
required by POSIX.

As the POSIX rationale explains, implementing the logic required by the
C standard does not violate POSIX, since a conforming system always has
a shell, therefore the logic will always return non-zero.

Since our libc is commonly used in non-conforming situations such as
chroots or thin jails, we should implement the full logic required by
the C standard.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	obiwac, bnovkov, kevans
Differential Revision:	https://reviews.freebsd.org/D55484
</pre>
</div>
</content>
</entry>
<entry>
<title>system(3): Write our own tests</title>
<updated>2026-02-25T21:12:29+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-25T21:12:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/freebsd-src.git/commit/?id=7a1ade5109ac57d1f59eaa75b5d0f13fabecf6ba'/>
<id>7a1ade5109ac57d1f59eaa75b5d0f13fabecf6ba</id>
<content type='text'>
Replace the somewhat perfunctory NetBSD tests with our own.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	bnovkov, kevans
Differential Revision:	https://reviews.freebsd.org/D55482
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the somewhat perfunctory NetBSD tests with our own.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	bnovkov, kevans
Differential Revision:	https://reviews.freebsd.org/D55482
</pre>
</div>
</content>
</entry>
</feed>
