Fix build on various architectures
This commit is contained in:
@@ -397,6 +397,7 @@ pid_t tint_exec(const char *command,
|
|||||||
chdir(dir);
|
chdir(dir);
|
||||||
close_all_fds();
|
close_all_fds();
|
||||||
if (terminal) {
|
if (terminal) {
|
||||||
|
#if !defined(__OpenBSD__)
|
||||||
fprintf(stderr, "tint2: executing in x-terminal-emulator: %s\n", command);
|
fprintf(stderr, "tint2: executing in x-terminal-emulator: %s\n", command);
|
||||||
wordexp_t words;
|
wordexp_t words;
|
||||||
words.we_offs = 2;
|
words.we_offs = 2;
|
||||||
@@ -405,6 +406,7 @@ pid_t tint_exec(const char *command,
|
|||||||
words.we_wordv[1] = (char*)"-e";
|
words.we_wordv[1] = (char*)"-e";
|
||||||
execvp("x-terminal-emulator", words.we_wordv);
|
execvp("x-terminal-emulator", words.we_wordv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
fprintf(stderr, "tint2: could not execute command in x-terminal-emulator: %s, executting in shell\n", command);
|
fprintf(stderr, "tint2: could not execute command in x-terminal-emulator: %s, executting in shell\n", command);
|
||||||
}
|
}
|
||||||
execlp("sh", "sh", "-c", command, NULL);
|
execlp("sh", "sh", "-c", command, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user