155163Sshin/*
255163Sshin * CDDL HEADER START
355163Sshin *
455163Sshin * The contents of this file are subject to the terms of the
555163Sshin * Common Development and Distribution License (the "License").
655163Sshin * You may not use this file except in compliance with the License.
755163Sshin *
855163Sshin * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
955163Sshin * or http://www.opensolaris.org/os/licensing.
1055163Sshin * See the License for the specific language governing permissions
1155163Sshin * and limitations under the License.
1255163Sshin *
1355163Sshin * When distributing Covered Code, include this CDDL HEADER in each
1455163Sshin * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1555163Sshin * If applicable, add the following below this CDDL HEADER, with the
1655163Sshin * fields enclosed by brackets "[]" replaced with your own identifying
1755163Sshin * information: Portions Copyright [yyyy] [name of copyright owner]
1855163Sshin *
1955163Sshin * CDDL HEADER END
2055163Sshin */
2155163Sshin
2255505Sshin/*
2355505Sshin * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2455505Sshin * Use is subject to license terms.
2555163Sshin */
2655163Sshin
2755163Sshin#pragma ident	"%Z%%M%	%I%	%E% SMI"
2855163Sshin
29#include <signal.h>
30#include <unistd.h>
31
32/*
33 * The canonical name should be 'go' since we prefer symbol names with fewer
34 * leading underscores.
35 */
36
37#pragma weak _go = go
38
39static int
40go(int a)
41{
42	return (a + 1);
43}
44
45static void
46handle(int sig)
47{
48	_go(1);
49	exit(0);
50}
51
52int
53main(int argc, char **argv)
54{
55	(void) signal(SIGUSR1, handle);
56	for (;;)
57		getpid();
58}
59