SYSVR4 signal question

SYSVR4 signal question

Post by Neil Co » Tue, 09 Jun 1992 04:16:11

Okay, thanks to everyone who answered my last post - now for a new one.

Signal handling in SYSV - what is the correct way to reset the signal handler
after it has been called. I tried resetting it as the first thing when the
handler is called i.e.
int sig;

   signal(SIGALRM, foobar);



But this didn't seem to work (segmentation fault).

I then found a piece of code which does this...

int sig;

   signal(SIGALRM, SIG_IGN);


   signal(SIGALRM, foobar);


I think this works, but my de*s crappy and I'm getting errors, so I'm not
sure. (it's not my code!)

Any suggestions?

Neil Cook.


SYSVR4 signal question

Post by W. Richard Steve » Tue, 09 Jun 1992 20:51:58

Quote:>Signal handling in SYSV - what is the correct way to reset the signal handler
>after it has been called.

>Any suggestions?

Your subject says SVR4, so my suggestion is to avoid the signal()
function completely under SVR4.  It brings in the old unreliable
Version-7 style semantics: the signal handler does not remain
installed when it's called and the signal being caught isn't
automatically blocked.

You should be using the newer POSIX.1 sigaction() function and
friends.  The signal handler remains installed until you change it.


1. question on smtp and sendmail on SysVR4

Hello world,

        I am using SysVR4 currently and it is using smtp as the mail protocol.
Is there an equivalent of .forward for smtp? I have tried using the .forward
but it's not working at all. How do I get around this problem?
        If there's no good way to solve this problem, may I know the steps
in changing the mail to use sendmail instead of smtp. Thank you!


2. Another Nail for their Coffin

3. Migration to SysVR4 question?

4. Linux Frequently Asked Questions with Answers (Part 1 of 6)

5. SysVr4 sh, question about chk_access()

6. metadb on raidctl

7. Unix SysVR4 TCP Stack question

8. What is a good upgrade choice?

9. SysVR4 for 386.

10. porting from SysVr3 to SysVr4 - hints and tips needed

11. SYSVR4 failures

12. getrusage in SysVR4

13. connecting sysvr4 machines via an annex terminal server