diff options
Diffstat (limited to 'Documentation/perf_counter/builtin-record.c')
-rw-r--r-- | Documentation/perf_counter/builtin-record.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/perf_counter/builtin-record.c b/Documentation/perf_counter/builtin-record.c index 23d1224ce98c..96bfb7c5f1e4 100644 --- a/Documentation/perf_counter/builtin-record.c +++ b/Documentation/perf_counter/builtin-record.c | |||
@@ -340,7 +340,7 @@ static int __cmd_record(int argc, const char **argv) | |||
340 | assert(nr_cpus <= MAX_NR_CPUS); | 340 | assert(nr_cpus <= MAX_NR_CPUS); |
341 | assert(nr_cpus >= 0); | 341 | assert(nr_cpus >= 0); |
342 | 342 | ||
343 | output = open(output_name, O_CREAT|O_RDWR, S_IRWXU); | 343 | output = open(output_name, O_CREAT|O_EXCL|O_RDWR, S_IRWXU); |
344 | if (output < 0) { | 344 | if (output < 0) { |
345 | perror("failed to create output file"); | 345 | perror("failed to create output file"); |
346 | exit(-1); | 346 | exit(-1); |