[PATCH-V4] xserver: Optional backtrace handler

Keith Packard keithp at keithp.com
Wed Oct 12 10:50:32 PDT 2011

On Thu, 6 Oct 2011 13:19:35 +0100, Barry Scott <barry.scott at onelan.co.uk> wrote:

> Is there anything else I need to do to make this patch acceptable
> for inclusion in Xorg?

Two things:

 1. This option needs to be restricted to root, much like many other
    options in the server (-modulepath, etc). There's a patch in the
    queue which regularizes this, but the xf86 DDX uses:

    if ( (geteuid() == 0) && (getuid() != 0) ) {
      FatalError("The '%s' option can only be used by root.\n", argv[i]);

 2. I'd love to figure out how to fork at the time of the error; this
    would encourage people to actually use this option regularly.

    posix threads makes the usual libc fork() function take the malloc
    mutex across its operations, but I wonder if syscall(SYS_fork) is
    portable enough to be used instead?

keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20111012/e81f4eb1/attachment.pgp>

More information about the xorg-devel mailing list