Fix incorrect write() return code handling
This commit is contained in:
parent
6849311d49
commit
5f0c10d94d
1 changed files with 1 additions and 1 deletions
|
@ -515,7 +515,7 @@ bool fgInitHome()
|
|||
}
|
||||
|
||||
int err = write(fd, buf, len);
|
||||
if (err != 0) {
|
||||
if (err < 0) {
|
||||
SG_LOG(SG_GENERAL, SG_ALERT, "failed to write to lock file:" << pidPath
|
||||
<< "\n\tdue to:" << simgear::strutils::error_string(errno));
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue