Nemoudeis
Federico Mena Quintero
Alex Akselrod
Nemoudeis and 3 others boosted

At a bar and need help? Order an "Angel shot".

-"with lime" means call the police.

- "on the rocks" means you need a taxi called.

- "neat" means you need an escort to your car.

You can also ask for Angela, as in "is Angela working tonight?"

See also the "help me" hand gesture: https://beige.party/@amiserabilist/114876091506990343

#Safety#Signals#PSA

At a bar and need help? Order an "Angel shot".

-"with lime" means call the police.

- "on the rocks" means you need a taxi called.

- "neat" means you need an escort to your car.

You can also ask for Angela, as in "is Angela working tonight?"

See also the "help me" hand gesture: https://beige.party/@amiserabilist/114876091506990343

#Safety#Signals#PSA

The next release of #swad will probably bring not a single new feature, but focus on improvements, especially regarding #performance. Support for using #kqueue (#FreeBSD et al) to handle #signals is a part of it (which is done and works). Still unsure whether I'll also add support for #Linux' #signalfd. Using kqueue also as a better backend for #timers is on the list.

Another hopefully quite relevant change is here:

https://github.com/Zirias/poser/commit/798f23547295f89fa0c751f0e707c3474b5c689c

In short, so far my #poser lib was always awaiting readiness notification (from kqueue, or #epoll on Linux, or select/poll for other platforms) before doing any read or write on a socket. This is the ideal approach for reads, because in the common case, a socket is NOT ready for reading ... our kernel must have received something from the remote end first. But for writes, it's not so ideal. The common case is that a socket IS ready to write (because there's space left in the kernel's send buffers). So, just try it, and only register for notifications if it ever fails, makes more sense. Avoids pointless waiting and pointless events, and e.g. with epoll, even unnecessary syscalls. 馃槈

Of course, this new credentials checker in #swad needs a #tool to edit these #password files, that's currently work in progress.

I just implemented the class for reading a password, pretty simple thing from a pipe, but an "interesting" job from a #terminal. Turns out doing that portably, reliably and secure needs quite some code. 馃檲

There's #getpass, but that's deprecated for good reasons (global state and not perfectly clear how it deals with #signals that could interrupt the input). And there's the sane replacement #readpassphrase in some systems (e.g. #FreeBSD), but that's not portable. 馃檭

So, plain old #tcsetattr it is, with some signal handling on top:
https://github.com/Zirias/swad/commit/447f48096fc275a5bae113393ffe9a3cbc66cc95