Subject: Re: SA_INTERRUPT
To: Yosep <yoskim@NMSU.Edu>
From: Noriyuki Soda <soda@sra.co.jp>
List: tech-kern
Date: 11/06/2003 18:53:17
>>>>> On Wed, 5 Nov 2003 22:25:49 GMT,
	christos@zoulas.com (Christos Zoulas) said:

> Yes, SA_INTERRUPT should be defined to be 0.

I guess christos means "in the application" here.
For example, Solaris 8 doesn't define SA_INTERRUPT at all.
So, portable programs shouldn't assume that SA_INTERRUPT is defined.

> We have SA_RESTART = 2 which is the opposite and is turned off by
> default.

This sentence is somewhat ambiguous.
Actually,
- We have SA_RESTART == 2 which means opposite of SA_INTERRUPT.
- The feature of SA_INTERRUPT is "ON" by default.

This default setting is not only on NetBSD.
Solaris, Linux, and nearly all modern UNIX use this default.


In article <Pine.GSO.4.55.0311051319000.14001@verdi.NMSU.Edu>,
	Yosep <yoskim@NMSU.Edu> wrote:

> I googled it, and some documents suggested "#define SA_INTERRUPT 0"

This works as christos said.
But perhaps it's better to do something like the following:

	#if defined(SA_INTERTUPT)
		sa.sa_flags = SA_INTERTUPT; /* somewhat old system??? */
	#elif defined(SA_RESETHAND)
		sa.sa_flags = 0; /* modern system */
	#else
		XXX FIXME
	#endif

> 0x0002" or some other hex number.

This is wrong.
--
soda