mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Add option to change supervised node's working directory
This commit is contained in:
parent
8aa77436f9
commit
aaa702fb4d
4 changed files with 36 additions and 4 deletions
12
src/main.cc
12
src/main.cc
|
@ -800,6 +800,18 @@ int main(int argc, char** argv)
|
|||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if ( zeek::supervised_node->directory )
|
||||
{
|
||||
if ( chdir(zeek::supervised_node->directory->data()) )
|
||||
{
|
||||
fprintf(stderr, "supervised node %s failed to chdir to %s: %s\n",
|
||||
node_name.data(),
|
||||
zeek::supervised_node->directory->data(),
|
||||
strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::set_new_handler(bro_new_handler);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue