2017-12-04 22:43:49 +01:00
|
|
|
#include <string.h>
|
|
|
|
#include "sway/commands.h"
|
2017-12-05 10:40:55 +01:00
|
|
|
#include "sway/config.h"
|
2017-12-04 22:43:49 +01:00
|
|
|
#include "log.h"
|
|
|
|
#include "stringop.h"
|
|
|
|
|
|
|
|
struct cmd_results *cmd_exec(int argc, char **argv) {
|
2020-08-23 13:59:22 +02:00
|
|
|
struct cmd_results *error = NULL;
|
|
|
|
if ((error = cmd_exec_validate(argc, argv))) {
|
|
|
|
return error;
|
|
|
|
}
|
2017-12-04 22:43:49 +01:00
|
|
|
if (config->reloading) {
|
|
|
|
char *args = join_args(argv, argc);
|
2019-01-20 19:51:12 +01:00
|
|
|
sway_log(SWAY_DEBUG, "Ignoring 'exec %s' due to reload", args);
|
2017-12-04 22:43:49 +01:00
|
|
|
free(args);
|
2019-01-11 00:27:21 +01:00
|
|
|
return cmd_results_new(CMD_SUCCESS, NULL);
|
2017-12-05 10:40:55 +01:00
|
|
|
}
|
2020-08-23 13:59:22 +02:00
|
|
|
return cmd_exec_process(argc, argv);
|
2017-12-04 22:43:49 +01:00
|
|
|
}
|