<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/util/util_runcmd.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>lib: tevent_req_set_endtime() can fail</title>
<updated>2025-09-02T08:08:28+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2025-08-18T08:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=ada25fd8eff6e792709429ea3610cb29e1da33fd'/>
<id>ada25fd8eff6e792709429ea3610cb29e1da33fd</id>
<content type='text'>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Fix the build on FreeBSD</title>
<updated>2021-01-25T09:48:09+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2021-01-23T03:10:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=29503c5b99cf614550d751391b0ccbec553a8787'/>
<id>29503c5b99cf614550d751391b0ccbec553a8787</id>
<content type='text'>
Commit 7d0981f5e78bc881ca6521932379c69604c33a38 broke the build on
FreeBSD:

[1589/3917] Compiling lib/util/util_runcmd.c
../../lib/util/util_runcmd.c:310:7: warning: implicit declaration of function 'WIFEXITED' is invalid in C99 [-Wimplicit-function-declaration]
                if (WIFEXITED(status)) {
                    ^
../../lib/util/util_runcmd.c:311:13: warning: implicit declaration of function 'WEXITSTATUS' is invalid in C99 [-Wimplicit-function-declaration]
                        status = WEXITSTATUS(status);
                                 ^
../../lib/util/util_runcmd.c:312:14: warning: implicit declaration of function 'WIFSIGNALED' is invalid in C99 [-Wimplicit-function-declaration]
                } else if (WIFSIGNALED(status)) {
                           ^
../../lib/util/util_runcmd.c:313:13: warning: implicit declaration of function 'WTERMSIG' is invalid in C99 [-Wimplicit-function-declaration]
                        status = WTERMSIG(status);
                                 ^
4 warnings generated.

[1590/3917] Linking bin/default/source4/dsdb/libsamdb-common-samba4.so
ld: error: undefined symbol: WIFEXITED
&gt;&gt;&gt; referenced by util_runcmd.c
&gt;&gt;&gt;               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)

ld: error: undefined symbol: WEXITSTATUS
&gt;&gt;&gt; referenced by util_runcmd.c
&gt;&gt;&gt;               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)

ld: error: undefined symbol: WIFSIGNALED
&gt;&gt;&gt; referenced by util_runcmd.c
&gt;&gt;&gt;               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)

ld: error: undefined symbol: WTERMSIG
&gt;&gt;&gt; referenced by util_runcmd.c
&gt;&gt;&gt;               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Mon Jan 25 09:48:09 UTC 2021 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 7d0981f5e78bc881ca6521932379c69604c33a38 broke the build on
FreeBSD:

[1589/3917] Compiling lib/util/util_runcmd.c
../../lib/util/util_runcmd.c:310:7: warning: implicit declaration of function 'WIFEXITED' is invalid in C99 [-Wimplicit-function-declaration]
                if (WIFEXITED(status)) {
                    ^
../../lib/util/util_runcmd.c:311:13: warning: implicit declaration of function 'WEXITSTATUS' is invalid in C99 [-Wimplicit-function-declaration]
                        status = WEXITSTATUS(status);
                                 ^
../../lib/util/util_runcmd.c:312:14: warning: implicit declaration of function 'WIFSIGNALED' is invalid in C99 [-Wimplicit-function-declaration]
                } else if (WIFSIGNALED(status)) {
                           ^
../../lib/util/util_runcmd.c:313:13: warning: implicit declaration of function 'WTERMSIG' is invalid in C99 [-Wimplicit-function-declaration]
                        status = WTERMSIG(status);
                                 ^
4 warnings generated.

[1590/3917] Linking bin/default/source4/dsdb/libsamdb-common-samba4.so
ld: error: undefined symbol: WIFEXITED
&gt;&gt;&gt; referenced by util_runcmd.c
&gt;&gt;&gt;               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)

ld: error: undefined symbol: WEXITSTATUS
&gt;&gt;&gt; referenced by util_runcmd.c
&gt;&gt;&gt;               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)

ld: error: undefined symbol: WIFSIGNALED
&gt;&gt;&gt; referenced by util_runcmd.c
&gt;&gt;&gt;               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)

ld: error: undefined symbol: WTERMSIG
&gt;&gt;&gt; referenced by util_runcmd.c
&gt;&gt;&gt;               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Mon Jan 25 09:48:09 UTC 2021 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Avoid an "includes.h"</title>
<updated>2021-01-22T19:54:37+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2021-01-14T09:10:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=7d0981f5e78bc881ca6521932379c69604c33a38'/>
<id>7d0981f5e78bc881ca6521932379c69604c33a38</id>
<content type='text'>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util: inline lib/util/util_runcmd.h again</title>
<updated>2019-02-08T01:54:20+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2019-02-02T12:09:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=531b713c558fad56c20b9f9d1fa4e6fbb236b100'/>
<id>531b713c558fad56c20b9f9d1fa4e6fbb236b100</id>
<content type='text'>
samba_runcmd_state should not be exposed!

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Fri Feb  8 02:54:20 CET 2019 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
samba_runcmd_state should not be exposed!

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Fri Feb  8 02:54:20 CET 2019 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util: add samba_runcmd_export_stdin() helper function</title>
<updated>2019-02-07T21:47:22+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2019-02-02T11:58:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=10114238c6c743bb25f5a7ff5788856693f420cb'/>
<id>10114238c6c743bb25f5a7ff5788856693f420cb</id>
<content type='text'>
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util/run_cmd: use a cleanup function instead of a destructor</title>
<updated>2017-09-30T10:14:56+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2017-09-29T11:07:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6539cc8a24204697b20506896c401e7b40eee928'/>
<id>6539cc8a24204697b20506896c401e7b40eee928</id>
<content type='text'>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13062

Pair-programmed-with: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Sat Sep 30 12:14:57 CEST 2017 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13062

Pair-programmed-with: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Sat Sep 30 12:14:57 CEST 2017 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util/run_cmd: remove a printf</title>
<updated>2017-09-30T06:01:25+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2017-09-29T11:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=94a8331e5425b735f9e2c0121afc2fb108bec891'/>
<id>94a8331e5425b735f9e2c0121afc2fb108bec891</id>
<content type='text'>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13062

Pair-programmed-with: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13062

Pair-programmed-with: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util/run_cmd: ensure fd_stdin gets set to -1 in the destructor</title>
<updated>2017-09-30T06:01:24+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2017-09-29T11:06:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=4aaf072d1fd732abf2cbea135d508260cdafa4eb'/>
<id>4aaf072d1fd732abf2cbea135d508260cdafa4eb</id>
<content type='text'>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13062

Pair-programmed-with: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13062

Pair-programmed-with: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util/run_cmd: prevent zombies in samba_runcmd_send on timeout</title>
<updated>2017-09-30T06:01:24+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2017-09-29T10:45:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9a8eeabd95afca2e88666b3e8f2af954dbf23ba9'/>
<id>9a8eeabd95afca2e88666b3e8f2af954dbf23ba9</id>
<content type='text'>
Ensure the state desctructor calls tfork_destroy to reap the waiter and
worker processes. Otherwise we leave the waiter process as a zombie
behind us as we never call waitpid on it in case of a timeout
or talloc_free() from the caller.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13062

Pair-programmed-with: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure the state desctructor calls tfork_destroy to reap the waiter and
worker processes. Otherwise we leave the waiter process as a zombie
behind us as we never call waitpid on it in case of a timeout
or talloc_free() from the caller.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13062

Pair-programmed-with: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>util_runcmd: Free the fde in event handler.</title>
<updated>2017-09-16T21:50:27+00:00</updated>
<author>
<name>Gary Lockyer</name>
<email>gary@catalyst.net.nz</email>
</author>
<published>2017-09-08T02:03:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=563bbb9c24d1d0bcc64530a6635b8b82d1ebb24d'/>
<id>563bbb9c24d1d0bcc64530a6635b8b82d1ebb24d</id>
<content type='text'>
Free the fde in the event handler to prevent the event triggering again
While not strictly necessary in this case, this code serves as an
example of the usage of tfork.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13037

Signed-off-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Sat Sep 16 23:50:27 CEST 2017 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Free the fde in the event handler to prevent the event triggering again
While not strictly necessary in this case, this code serves as an
example of the usage of tfork.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13037

Signed-off-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Sat Sep 16 23:50:27 CEST 2017 on sn-devel-144
</pre>
</div>
</content>
</entry>
</feed>
