summaryrefslogtreecommitdiffstats
path: root/lib/util/util_runcmd.c
Commit message (Collapse)AuthorAgeFilesLines
* lib/util: fix const warningsStefan Metzmacher2014-04-021-2/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* util: Remove unused fde_stdin in samba_runcmd.Andreas Schneider2012-12-121-22/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* runcmd: use set_close_on_exec()Andrew Tridgell2011-12-221-0/+8
| | | | | | | this prevents a fd leak to child processes Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Dec 22 14:00:06 CET 2011 on sn-devel-104
* runcmd: use a pipe for stdin to child processesAndrew Tridgell2011-12-221-7/+46
| | | | | this allows child processes to detect the exit of the parent by looking for EOF on stdin
* Fix a bunch of "warning: variable ‘XXXX’ set but not used ↵Jeremy Allison2011-11-211-2/+1
| | | | | | | [-Wunused-but-set-variable]" warnings from the new gcc. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Nov 21 23:39:08 CET 2011 on sn-devel-104
* tdb: Use <tdb.h> to include tdb so system headers are found when building ↵Jelmer Vernooij2011-02-281-1/+1
| | | | against system tdb.
* Use <tevent.h> so the system tevent gets included, if enabled.Jelmer Vernooij2011-02-281-2/+2
|
* util-runcmd: ignore spurious ECHILD errorsAndrew Tridgell2010-04-201-0/+14
| | | | | | | | | | when we get ECHILD in samba_runcmd it is because the parent has set SIGCHLD to SIG_IGN. In that case the child status information is lost. We then have to fallback on the logging of child error messages for any useful information on what happened to the child. A longer term fix is to stop using SIG_IGN for SIGCHLD in the standard process model of s4.
* runcmd: use tevent_re_initialise() to close socketsAndrew Tridgell2010-04-191-0/+4
| | | | this ensures that all event fds are closed in the child
* util: on FreeBSD true is in /usr/bin. Use execvp to find itAndrew Tridgell2010-03-261-1/+1
|
* lib/util: change samba_runcmd() to use tevent_req _send/_recvStefan Metzmacher2010-03-091-139/+180
| | | | metze
* s4-dns: use a loadparm list for samba_runcmd() commandsAndrew Tridgell2010-02-261-5/+5
| | | | | | This allows commands with multiple arguments and quoting to be used, while still avoiding running a shell (and this having shell expansion problems)
* util: added samba_runcmd()Andrew Tridgell2010-02-171-0/+253
This allows us to run a child command in an async fashion, with control over logging of stdout and stderr (which appears in the Samba log file). This is useful for ensuring we don't miss important messages from rndc commands (for example). Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>