diff --git a/src/cmds/ntux_cmd_strace.c b/src/cmds/ntux_cmd_strace.c index 08d7eb4..b434189 100644 --- a/src/cmds/ntux_cmd_strace.c +++ b/src/cmds/ntux_cmd_strace.c @@ -5,6 +5,8 @@ /***********************************************************/ #include +#include + #include #include #include @@ -44,7 +46,7 @@ int ntux_cmd_strace(const struct ntux_driver_ctx * dctx) /* fdlog */ if (logfile) { - if ((fdlog[1] = __sys_open(logfile,O_CREAT|O_WRONLY,0)) < 0) + if ((fdlog[1] = __sys_open(logfile,O_CREAT|O_TRUNC|O_WRONLY,0)) < 0) if (ntux_errno_set(dctx,fdlog[1])) return NTUX_SYSTEM_ERROR(dctx); } else {