]> git.ipfire.org Git - thirdparty/systemd.git/commit
coredumpctl: open output file only before writing
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 20 Nov 2018 08:27:19 +0000 (09:27 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 20 Nov 2018 15:48:21 +0000 (16:48 +0100)
commit158ecef56b63aff23bc6fc04b7a7fce08a56b55c
treeb4e09bcf672cfcf4406b9ffa5019ea9463432572
parentcac0b957906f282b4a54e28187f24d4789aa2bad
coredumpctl: open output file only before writing

We would open the file very early, which is not nice, if we e.g. fail when
parsing later options. Let's do the usual thing and just open it just before
writing, and close immediately after writing.
src/coredump/coredumpctl.c