projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
relayd: Create output directory in main()
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.c
diff --git
a/src/bin/lttng-relayd/main.c
b/src/bin/lttng-relayd/main.c
index cd17dcd6720717e54fa9897d96a587c97bd68450..4f9d74274943fdc433ed31c6ab60b6b05e4d5258 100644
(file)
--- a/
src/bin/lttng-relayd/main.c
+++ b/
src/bin/lttng-relayd/main.c
@@
-2107,6
+2107,15
@@
int main(int argc, char **argv)
goto exit;
}
goto exit;
}
+ /* Try to create directory if -o, --output is specified. */
+ if (opt_output_path) {
+ ret = utils_mkdir_recursive(opt_output_path, S_IRWXU | S_IRWXG);
+ if (ret < 0) {
+ ERR("Unable to create %s", opt_output_path);
+ goto exit;
+ }
+ }
+
/* Daemonize */
if (opt_daemon) {
ret = daemon(0, 0);
/* Daemonize */
if (opt_daemon) {
ret = daemon(0, 0);
This page took
0.023707 seconds
and
4
git commands to generate.