How, in this century, did anyone think passing http url params as env vars was an acceptable design? Fix is incomplete & goahead is unfixable.https://twitter.com/elttam/status/942630494054752256 …
At best that lets you safely abort the program on excess input; there's still no way to cleanly recover.
-
-
I'm not saying it's a good idea, but http://pubs.opengroup.org/onlinepubs/009695399/functions/siglongjmp.html … is posix. (Black belt in disgusting solutions to impossible problems.)
-
longjmp is not AS-safe, so it can be used in a signal handler iff the signal does not interrupt any AS-unsafe functions. All of stdio is AS-unsafe.
-
You keep thinking threading is a mandatory part of C.
-
AS-safety has no relation to threads. (That said
@RichFelker is slightly incorrect here: longjmp is AS-Safe but longjmping out of gets would not be http://pubs.opengroup.org/onlinepubs/9699919799/functions/longjmp.html … ) -
Ah, that's very strange text. It's almost the same as being non-AS-safe, but allows longjmp as long as rest of program only calls AS-safe functions until _exit or exec.
-
And indeed it has nothing to do with threads. It just means the internal state of stdio (or anything not AS-safe) will be inconsistent after longjmp out of it from a signal handler.
-
I don't understand the argument here. If we're providing a safe gets(), we're necessarily free to write down our own refinement of POSIX (which we're implementing). That can include more permissive AS-safety rules. Clients targeting the general POSIX gets() were already hosed.
-
Nah, my point was you can aftermarket set up a choke collar for gets. I didn't say it was a good idea, just not impossible. :)
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.