Re: flock(2): locking against itself?

2023-04-18 Thread Mouse
>> While writing this mail, it occurs to me that [...] > Try libtickit--that uses callbacks (I think): > https://www.leonerd.org.uk/code/libtickit/ It looks notably sane. (So far, the only things I see that annoy me are (1) there's no git:// repo to clone, (2) the Makefile blindly assumes GNU m

Re: flock(2): locking against itself?

2023-04-18 Thread RVP
On Tue, 18 Apr 2023, Mouse wrote: While writing this mail, it occurs to me that a mode wherein everything operates same as now, except that output, instead of being pushed to the tty with fwrite() or write() or writev() or whatever, is just passed to a callback. That would address my use cases

Re: flock(2): locking against itself?

2023-04-18 Thread Mouse
>> Here, we have software that's crippled by lacking support for >> producing its output in a generalized fashion - so, rather than >> fixing the limitation, we depend on a heavyweight OS feature to work >> around it? [...] > Or we have a library that is specifically designed and implemented to >

Re: flock(2): locking against itself?

2023-04-18 Thread Brett Lymn
On Tue, Apr 18, 2023 at 10:40:24AM -0400, Mouse wrote: > > Well, FSVO "dismissed". It seems ridiculously heavyweight for the > task; it also feels wrong. Here, we have software that's crippled by > lacking support for producing its output in a generalized fashion - so, > rather than fixing the l

Re: flock(2): locking against itself?

2023-04-18 Thread Mouse
>> (a) Does anyone have any other ideas, not mentioned above, for how >> to address these issues? > Not really, I would suggest using a pty even though you have > dismissed it. Well, FSVO "dismissed". It seems ridiculously heavyweight for the task; it also feels wrong. Here, we have software tha

Re: flock(2): locking against itself?

2023-04-18 Thread Brett Lymn
On Sun, Apr 16, 2023 at 12:28:03AM -0400, Mouse wrote: > > (a) Does anyone have any other ideas, not mentioned above, for how to > address these issues? > Not really, I would suggest using a pty even though you have dismissed it. The libcurses atf test does this to test curses functions, capturi