chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update TODO
[elogind.git]
/
src
/
journal
/
coredumpctl.c
diff --git
a/src/journal/coredumpctl.c
b/src/journal/coredumpctl.c
index e564ab656c85c481f8934a6feeaba940cf06797e..bf943bc032528ca717630c5c293570f5d736409d 100644
(file)
--- a/
src/journal/coredumpctl.c
+++ b/
src/journal/coredumpctl.c
@@
-472,7
+472,7
@@
static int run_gdb(sd_journal *j) {
data = (const uint8_t*) data + 9;
len -= 9;
data = (const uint8_t*) data + 9;
len -= 9;
- fd = mkostemp
(path, O_WRONLY
);
+ fd = mkostemp
_safe(path, O_WRONLY|O_CLOEXEC
);
if (fd < 0) {
log_error("Failed to create temporary file: %m");
return -errno;
if (fd < 0) {
log_error("Failed to create temporary file: %m");
return -errno;
@@
-490,8
+490,7
@@
static int run_gdb(sd_journal *j) {
goto finish;
}
goto finish;
}
- close_nointr_nofail(fd);
- fd = -1;
+ fd = safe_close(fd);
pid = fork();
if (pid < 0) {
pid = fork();
if (pid < 0) {