diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-11 07:18:56 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-11 07:18:56 +0100 |
commit | 658622eb5e1b81d394f066df44bc9f0abe9cc807 (patch) | |
tree | a7b3fb997a47cbc6bd134b699bf6181cb74d2f8a /lib/Utils/xfuncs.cpp | |
parent | b0abdde8871b0366868b917df040a8880165ba30 (diff) | |
download | abrt-658622eb5e1b81d394f066df44bc9f0abe9cc807.tar.gz abrt-658622eb5e1b81d394f066df44bc9f0abe9cc807.tar.xz abrt-658622eb5e1b81d394f066df44bc9f0abe9cc807.zip |
RunApp: safer chdir. Overhauled "sparn a child and get its output" in general
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Utils/xfuncs.cpp')
-rw-r--r-- | lib/Utils/xfuncs.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp index 8621b5f..3ab3739 100644 --- a/lib/Utils/xfuncs.cpp +++ b/lib/Utils/xfuncs.cpp @@ -141,6 +141,12 @@ off_t xlseek(int fd, off_t offset, int whence) return off; } +void xchdir(const char *path) +{ + if (chdir(path)) + perror_msg_and_die("chdir(%s)", path); +} + char* xvasprintf(const char *format, va_list p) { int r; |