blob: 97cf93e8d03852133d8eb60fde6d80d4800b974f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
?RCS: $Id$
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_keepsig.U,v $
?RCS: Revision 3.0.1.4 1995/07/25 13:57:56 ram
?RCS: patch56: made cc and ccflags optional dependencies
?RCS:
?RCS: Revision 3.0.1.3 1995/01/11 15:26:25 ram
?RCS: patch45: protected "sh -c" within backquotes for Linux and SGI
?RCS:
?RCS: Revision 3.0.1.2 1994/10/29 16:13:59 ram
?RCS: patch36: call ./bsd explicitely instead of relying on PATH
?RCS:
?RCS: Revision 3.0.1.1 1993/10/16 13:48:47 ram
?RCS: patch12: comment for SIGNALS_KEPT was the other way round
?RCS:
?RCS: Revision 3.0 1993/08/18 12:06:26 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:d_keepsig: cat Compile rm Guess contains echo n c Setvar run
?MAKE: -pick add $@ %<
?S:d_keepsig:
?S: This variable contains the eventual value of the SIGNALS_KEPT symbol,
?S: which indicates to the C program if signal handlers need not reinstated
?S: after receipt of a signal.
?S:.
?C:SIGNALS_KEPT (PERSISTENT_SIGNAL):
?C: This symbol is defined if signal handlers needn't be reinstated after
?C: receipt of a signal.
?C:.
?H:#$d_keepsig SIGNALS_KEPT /**/
?H:.
?F:!try !try.out
?LINT:set d_keepsig
: see if signals are kept
val="$undef";
echo " "
echo "Checking to see if signal handlers stick around..." >&4
$cat >try.c <<'EOCP'
foo() {}
int main()
{
signal(2, foo);
kill(getpid(), 2);
kill(getpid(), 2);
printf("abc\n");
}
EOCP
set try
if eval $compile; then
?X: On AIX a single ./try will not work (with ksh)
?X: Backquotes required on Linux and SGI (prevents "ambiguous output redirect")
?X: (reported by Xavier LeVourch <xavierl@eiffel.com>)
echo `sh -c $run ./try >try.out 2>/dev/null` >/dev/null
if $contains abc try.out >/dev/null 2>&1; then
echo "Yes, they do."
val="$define";
else
echo "No, they don't."
fi
else
$echo $n "(I can't seem to compile the test program. Assuming $c"
if ./bsd; then
echo "they do.)"
val="$define"
else
echo "they don't.)"
fi
fi
set d_keepsig
eval $setvar
$rm -f try*
|