mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: compatability: struct sigaction missing sa_restorer
Date: Sat, 14 Apr 2012 18:16:52 -0400	[thread overview]
Message-ID: <20120414221652.GM7281@brightrain.aerifal.cx> (raw)
In-Reply-To: <20120414131842.a43c4c70.idunham@lavabit.com>

On Sat, Apr 14, 2012 at 01:18:42PM -0700, Isaac Dunham wrote:
> On Fri, 13 Apr 2012 23:03:02 -0400
> Rich Felker <dalias@aerifal.cx> wrote:
> ...
> > must be in the reserved namespace. Fortunately for us, per POSIX XSH
> > 2.2.2 The Name Space, sa_* is in the reserved namespace for signal.h,
> > so it's valid to just call it sa_restorer. As such, I'll fix it.
> > 
> > > This prevents building Xvesa; I definitely won't patch it to use
> > > __sa_restorer.  Don't know if sa_restorer is commonly used.
> > 
> > With that said, installing your own sa_restorer is not a very good
> > idea, and almost surely a very bad design... Not sure why Xvesa is
> > doing this...
> 
> Just initializing certain parts to 0, apparently:
> 
> act.sa_handler = LinuxVTRequest;
> sigemptyset (&act.sa_mask);
> act.sa_flags = 0;
> act.sa_restorer = 0; /* PROBLEM */
> sigaction(SIGUSR1, &act, 0);
> 
> ...
> Looks like a later version of Xvesa just deleted this line, so I'll do that.

This is definitely wrong and unnecessary. If it were necessary, it
would be impossible to write portable programs using sigaction. The
reason it's unnecessary is that even libcs that use sa_restorer
require the SA_RESTORER flag to be set in order to use it; otherwise
it's ignored.

> Xvesa was axed a couple years ago, but Xfbdev requires working
> framebuffer drivers (not a given, when an i810 system is one of the
> planned targets) and Xorg may not work without dynamic linking
> (every driver is a library), so I've been using the amigolinux
> version of TinyX (version "1.2.61", based on an *old* Xorg). This is
> the only maintained Xvesa, and is a fairly small, single download.
> 
> It's only been tested against uclibc, but the developers are ready
> to patch it.

IMO they should patch it out. It's dead code and leads to portability
problems. You can cite my explanation above if you need to.

Rich


      reply	other threads:[~2012-04-14 22:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-14  2:20 Isaac Dunham
2012-04-14  3:03 ` Rich Felker
2012-04-14 20:18   ` Isaac Dunham
2012-04-14 22:16     ` Rich Felker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120414221652.GM7281@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).