On Tue, Jan 30, 2018 at 07:57:14PM +0000, Al Poole wrote:
> Hi,
>
> I've been having some issues with select/sigprocmask and signals on
> OpenBSD 6.2 (amd64).
>
> Since 6.0, I've been working on EFL (enlightenment.org) on FreeBSD and
> OpenBSD. OpenBSD broke sometime after the 6.0 release (in the mainloop
> SIGCHLD were getting lost and applications would hang).
>
> I'm hoping this test-case might also explain the issues with EFL.
>
> The test code URL:
>
> http://haxlab.org/stuff/sig.c.txt
>
> EXPECTED OUTPUT
>
> # identical on Linux, FreeBSD, MacOS and Windows POSIX emulation.
>
> $ ./a.out
> Timeout
> Timeout
> Timeout
> buf: Yo
>
> Timeout
> Timeout
> Timeout
> buf: Yo
>
> Timeout
> Timeout
> Timeout
> buf: Yo
>
> Child exits!
> Exiting!
>
> BELOW THE OUTPUT ON OPENBSD 6.2 (amd64):
>
> $ ./a.out
> ^Cbuf: Yo
>
>
> ^Cbuf: Yo
>
> ^CExiting!
>
> The code should handle SIGINT (CTRL^C) gracefully, but I noticed
> running the testcase on OpenBSD without interrupting (SIGINT) the
> behaviour is so wildly different from testing on all the other major
> UNIX and Unix-like systems.
>
> The OpenBSD handling of SIGINT doesn't work either in this case.
>
> I wonder if anyone could help here? Whether I am doing something
> wrong, or maybe even finding the OpenBSD EFL main loop signal issue?
>
> Thanks very much,
>
> Al Poole
This is what I see, tested on armv7 and amd64, without pressing ^C. It
is not clear from your description if you are doing that during the
runs on the "working" systems.
$ cc -O2 x.c
$ ./a.out
Timeout
Timeout
Timeout
buf: Yo
Timeout
Timeout
Timeout
buf: Yo
Timeout
Timeout
Timeout
buf: Yo
Child exits!
Exiting!
So the expected output. How do you compile/run your program
*exactly*?
-Otto