[naemon-dev] commands.c question

Daniel Wittenberg dwittenberg2008 at gmail.com
Tue Feb 25 23:15:09 CET 2014


I'm curious why we're doing a chdir here, and if so any reason we shouldn't
be checking the return code to make sure it worked?

commands.c:278
/* we must preserve command_file before nuking memory */
        (void)chdir("/tmp");
        (void)chdir("nagios-cfw");
        str = strdup(command_file);
        free_memory(get_global_macros());
        command_file = str;
        exit(command_file_worker(sv[1]));


Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/naemon-dev/attachments/20140225/0d23e151/attachment.html>


More information about the Naemon-dev mailing list