Post

Replies

Boosts

Views

Activity

Reply to Change in iOS 14 Beta 3 to trigger 0xdead10cc
I can confirm that this is still an issue on beta 6. To reproduce, use the following to get a file descriptor, instead of NSFileHandle.int fd = open([fileUrl path].UTF8String, ORDWR);and then, the following to acquire a file lock:-int ret = flock(fd, LOCKSH); The FileHandle was just to release the fd when the object went away. This code right here never crashes for me:     let lock2URL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: sharedContainerIdentifier)!.appendingPathComponent("shared2.lock")     var fd: Int32 = -1     try? Data().write(to: lock2URL, options: .atomic)     fd = open(lock2URL.path, O_RDWR)     assert(fd >= 0)     assert(flock(fd, LOCK_SH) == 0) followed by backgrounding the app and verifying that it is suspended in the debugger. I'm testing on an iPhone 6s with iOS 14 beta 6.
Aug ’20
Reply to Change in iOS 14 Beta 3 to trigger 0xdead10cc
I'm trying to reproduce this issue with beta 6, but haven't been able to do it. Can anyone confirm that they still see it? I have an extension and an app both using flock to take a lock on a file in a shared container and the app appears to be able to suspend just fine while holding the lock. This is using flock(fileHandle.fileDescriptor, LOCK_EX | LOCK_NB).
Aug ’20