Skip to content

Commit

Permalink
mxqd: Remove unnecessary cd(pwd)
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Feb 21, 2022
1 parent 6f9f7af commit 39480f9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2875,19 +2875,12 @@ int main(int argc, char *argv[])

while (global_sigrestart_cnt) {
_mx_cleanup_free_ char *saved_argv_str = NULL;
_mx_cleanup_free_ char *saved_cwd = NULL;
char **saved_argv;

saved_argv_str = mx_strvec_to_str(argv);
saved_cwd = get_current_dir_name();

mx_log_info("Reexecuting mxqd... ");

res = chdir(saved_cwd);
if (res < 0) {
mx_log_fatal("Aborting restart: chdir(%s) failed: %m", saved_cwd);
break;
}

saved_argv = mx_strvec_from_str(saved_argv_str);
if (!saved_argv) {
mx_log_fatal("Can't recaculate commandline. str_to_strvev(%s) failed: %m", saved_argv_str);
Expand Down

0 comments on commit 39480f9

Please sign in to comment.