Skip to content

Commit a7936c6

Browse files
WizKidfacebook-github-bot
authored andcommitted
Make us not crash if you flock a file in the file cache
Reviewed By: jano Differential Revision: D73464790 fbshipit-source-id: 7b445469b3379a671db50fa93d7202d5b42b27bb
1 parent e014121 commit a7936c6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

hphp/runtime/base/mem-file.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,5 +189,9 @@ void MemFile::unzip() {
189189
m_len = len;
190190
}
191191

192+
bool MemFile::lock(int operation, bool &wouldblock /* = false */) {
193+
return false;
194+
}
195+
192196
///////////////////////////////////////////////////////////////////////////////
193197
}

hphp/runtime/base/mem-file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ struct MemFile : File {
5151
bool eof() override;
5252
bool rewind() override;
5353
bool flush() override;
54+
bool lock(int operation, bool &wouldblock) override;
5455

5556
Array getMetaData() override;
5657

@@ -65,4 +66,3 @@ struct MemFile : File {
6566

6667
///////////////////////////////////////////////////////////////////////////////
6768
}
68-

0 commit comments

Comments
 (0)