Working on linux now, better logging

This commit is contained in:
2026-03-26 16:41:11 +01:00
parent dd96fe1f34
commit 8357960a6b
2 changed files with 2 additions and 1 deletions

View File

@@ -148,8 +148,9 @@ bool runRktWebview(Handle_t *handler)
posix_spawn_file_actions_t action; posix_spawn_file_actions_t action;
posix_spawn_file_actions_init(&action); posix_spawn_file_actions_init(&action);
unlink(log_file.c_str());
posix_spawn_file_actions_addopen(&action, STDOUT_FILENO, log_file.c_str(), O_CREAT|O_WRONLY, 0600); posix_spawn_file_actions_addopen(&action, STDOUT_FILENO, log_file.c_str(), O_CREAT|O_WRONLY, 0600);
posix_spawn_file_actions_addopen(&action, STDERR_FILENO, log_file.c_str(), O_WRONLY|O_APPEND, 0600); posix_spawn_file_actions_addopen(&action, STDERR_FILENO, log_file.c_str(), O_WRONLY, 0600);
int r = posix_spawn(&handler->rkt_webview_prg_pid, rkt_webview_prg_path, &action, nullptr, argv, environ); int r = posix_spawn(&handler->rkt_webview_prg_pid, rkt_webview_prg_path, &action, nullptr, argv, environ);