mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 18:11:35 +00:00
transfused: if the pidfile exists, make sure to truncate it
This commit is contained in:
parent
cbd5ca5991
commit
b1d3101846
@ -440,7 +440,7 @@ void write_pidfile(char * pidfile) {
|
||||
|
||||
pid_s_len = strlen(pid_s);
|
||||
|
||||
fd = open(pidfile, O_WRONLY | O_CREAT, 0644);
|
||||
fd = open(pidfile, O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
||||
if (fd == -1)
|
||||
die(1, "", "Couldn't open pidfile path %s: ", pidfile);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user