News for hackers. Stuff that matters.
Re:Unix System Call Timeouts by GauntletWizard on Sunday March 12, 2017 @10:38PM (#13854848)
In a distributed systems problem, almost everything should have a timeout - mkdir and all filesystem operations should be prepared for the possibility that backing store will be slow, unresponsive, or simply broken.

On the other hand, the application layer is probably the wrong place to implement such. Most NFS clients have the option to set a timeout, and system calls that take longer than it instead receive EIO. This isn't perfect, but if you're building an application that needs more complex behavior than that, you probably do need to be building on a more filesystem specific API. Still, there's a point to be made here - There should be a general template or recommendation for what that API is.

Re:Unix System Call Timeouts by loeg on Sunday March 12, 2017 @10:40PM (#13854857)
> On the other hand, the application layer is probably the wrong place to implement such. Most NFS clients have the option to set a timeout, and system calls that take longer than it instead receive EIO. This isn't perfect, but if you're building an application that needs more complex behavior than that, you probably do need to be building on a more filesystem specific API.

Yes, exactly.

Re:Unix System Call Timeouts by xelxebar on Monday March 13, 2017 @12:40AM (#13855270)
Exactly. I'm kind of surprised to see the comments arguing that all potentially blocking syscalls should have a timeout field or something. That kind of thing just begs to be factored out into a more general framework.
Re:Unix System Call Timeouts by GauntletWizard on Tuesday March 14, 2017 @05:00PM (#13871425)