summaryrefslogtreecommitdiff
path: root/lib/util/util_runcmd.c
AgeCommit message (Collapse)AuthorFilesLines
2011-12-22runcmd: use set_close_on_exec()Andrew Tridgell1-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
2011-12-22runcmd: use a pipe for stdin to child processesAndrew Tridgell1-7/+46
this allows child processes to detect the exit of the parent by looking for EOF on stdin
2011-11-21Fix a bunch of "warning: variable ‘XXXX’ set but not used ↵Jeremy Allison1-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
2011-02-28tdb: Use <tdb.h> to include tdb so system headers are found when building ↵Jelmer Vernooij1-1/+1
against system tdb.
2011-02-28Use <tevent.h> so the system tevent gets included, if enabled.Jelmer Vernooij1-2/+2
2010-04-20util-runcmd: ignore spurious ECHILD errorsAndrew Tridgell1-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.
2010-04-19runcmd: use tevent_re_initialise() to close socketsAndrew Tridgell1-0/+4
this ensures that all event fds are closed in the child
2010-03-26util: on FreeBSD true is in /usr/bin. Use execvp to find itAndrew Tridgell1-1/+1
2010-03-09lib/util: change samba_runcmd() to use tevent_req _send/_recvStefan Metzmacher1-139/+180
metze
2010-02-26s4-dns: use a loadparm list for samba_runcmd() commandsAndrew Tridgell1-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)
2010-02-17util: added samba_runcmd()Andrew Tridgell1-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>