Weird behavior with writes to a unix socket pair

2019-09-26 Thread Petr Skočík
Hi, I've been testing the effects of the SO_RCVBUF/SO_SNDBUF socket options on unix sockets on various platforms, and I've run into some curious unix socket behavior on Cygwin (independent of the SO_RCVBUF/SO_SNDBUF options). This piece of code should get blocked in one of the writes (and it

malloc(0) crashing with SIGABRT

2019-09-09 Thread Petr Skočík
There's been a twitter discussion on how different POSIX platforms handle malloc(0): https://twitter.com/sortiecat/status/1170697927804817412 . As for Cygwin, the answer appears to be "not well", but this should be easy to fix. Best regards, Petr Skocik -- Problem reports:

malloc(0) crashes with SIGABRT

2019-09-09 Thread Petr Skočík
https://twitter.com/sortiecat/status/1170697927804817412 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

bind() behavior inconsistency with Linux and MacOS

2019-06-05 Thread Petr Skočík
Hi. I don't know if this is technically a bug, but I've noticed that unlike on Linux or MacOS, I a cannot bind a unix domain socket in a child process and then listen on it in the parent. The bind succeeds but `listen()` in the parent then fails with EINVAL. (The reason I'd like to `bind` in a

Re: uc_sigmask set in a sigaction signal handler not honored

2019-04-03 Thread Petr Skočík
> On Apr 3 14:15, Corinna Vinschen wrote: > > On Apr 3 11:27, Petr Skočík wrote: > > > Hi. Correct me if I'm wrong but POSIX appears to define > > > > > > https://pubs.opengroup.org/onlinepubs/7908799/xsh/ucontext.h.html > > > >

uc_sigmask set in a sigaction signal handler not honored

2019-04-03 Thread Petr Skočík
Hi. Correct me if I'm wrong but POSIX appears to define https://pubs.opengroup.org/onlinepubs/7908799/xsh/ucontext.h.html as, among other things, containing the field: sigset_tuc_sigmask the set of signals that are blocked when this context is active and it also