mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kevin B. Hendricks" <khendricks@ivey.uwo.ca>
To: jekacur@ca.ibm.com
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.linuxppc.org
Subject: Re: [Fwd: sigcontext on Linux-ppc in user space]
Date: Thu, 25 Jan 2001 13:10:40 -0500	[thread overview]
Message-ID: <200101251810.f0PIAeH04079@ashley.ivey.uwo.ca> (raw)

Hi,

Here is what I get from running it on my system (ppc linux with 2.2.15 kernel with some mods and glibc-2.1.3).

But no segfault.

Kevin


[kbhend@localhost ~]$ gcc -O2 -ojunk junk.c
[kbhend@localhost ~]$ ./junk
SIGUSR1 = 10
scp = 7fffe9a4
scp->signal = 0
[kbhend@localhost ~]$ 




On Thursday, January 25, 2001, at 10:09 AM, jekacur@ca.ibm.com wrote:

> #include <stdio.h> 
> #include <signal.h> 
>  
> /* Function Prototypes */ 
> void install_sigusr1_handler(void); 
> void sigusr_handler(int , siginfo_t *, struct sigcontext * scp); 
>  
> int main(void) 
> { 
>         install_sigusr1_handler(); 
>         printf("SIGUSR1 = %d\n", SIGUSR1); 
>         raise(SIGUSR1); 
>         exit(0); 
> } 
>  
> void install_sigusr1_handler(void) 
> { 
>         struct sigaction newAct; 
>  
>         if (sigemptyset(&newAct.sa_mask) != 0) { 
>                 fprintf(stderr, "Warning, sigemptyset failed.\n"); 
>         } 
>  
>         newAct.sa_flags = 0; 
>         newAct.sa_flags |= SA_SIGINFO | SA_RESTART; 
>  
>         newAct.sa_sigaction = (void 
> (*)(int,siginfo_t*,void*))sigusr_handler; 
>  
>         if (sigaction(SIGUSR1, &newAct, NULL) != 0) { 
>                 fprintf(stderr, "Couldn't install SIGUSR1 handler.\n"); 
>                 fprintf(stderr, "Exiting.\n"); 
>                 exit(1); 
>         } 
> } 
>  
> void sigusr_handler(int signo, siginfo_t *siginfp, struct sigcontext * scp) 
> { 
>         printf("scp = %08x\n", scp); 
>         printf("scp->signal = %d\n", scp->signal); 
> } 
>  
>  
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

             reply	other threads:[~2001-01-25 18:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-25 18:10 Kevin B. Hendricks [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-01-25 18:50 jekacur
2001-01-25 18:44 Kevin B. Hendricks
2001-01-25 15:09 jekacur
2001-01-25 18:11 ` Dan Malek

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=200101251810.f0PIAeH04079@ashley.ivey.uwo.ca \
    --to=khendricks@ivey.uwo.ca \
    --cc=jekacur@ca.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®