xref: /freebsd/usr.bin/procstat/tests/while1.c (revision da5432eda807c4b7232d030d5157d5b417ea4f52)
1c7d813a9SEnji Cooper /*
2da5069e1SEnji Cooper  * Copyright (c) 2017 Enji Cooper <ngie@FreeBSD.org>
3c7d813a9SEnji Cooper  *
4c7d813a9SEnji Cooper  * Redistribution and use in source and binary forms, with or without
5c7d813a9SEnji Cooper  * modification, are permitted provided that the following conditions
6c7d813a9SEnji Cooper  * are met:
7c7d813a9SEnji Cooper  * 1. Redistributions of source code must retain the above copyright
8c7d813a9SEnji Cooper  *    notice, this list of conditions and the following disclaimer.
9c7d813a9SEnji Cooper  * 2. Redistributions in binary form must reproduce the above copyright
10c7d813a9SEnji Cooper  *    notice, this list of conditions and the following disclaimer in the
11c7d813a9SEnji Cooper  *    documentation and/or other materials provided with the distribution.
12c7d813a9SEnji Cooper  *
13c7d813a9SEnji Cooper  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
14c7d813a9SEnji Cooper  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
15c7d813a9SEnji Cooper  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16c7d813a9SEnji Cooper  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
17c7d813a9SEnji Cooper  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18c7d813a9SEnji Cooper  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19c7d813a9SEnji Cooper  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20c7d813a9SEnji Cooper  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21c7d813a9SEnji Cooper  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22c7d813a9SEnji Cooper  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23c7d813a9SEnji Cooper  * POSSIBILITY OF SUCH DAMAGE.
24c7d813a9SEnji Cooper  */
25c7d813a9SEnji Cooper 
26c7d813a9SEnji Cooper #include <sys/cdefs.h>
27c7d813a9SEnji Cooper #include <stdlib.h>
28c7d813a9SEnji Cooper #include <unistd.h>
29c7d813a9SEnji Cooper 
30c7d813a9SEnji Cooper int
main(void)31c7d813a9SEnji Cooper main(void)
32c7d813a9SEnji Cooper {
33c7d813a9SEnji Cooper 
34*ddc0daeaSJilles Tjoelker 	if (write(STDOUT_FILENO, "started\n", 8) != 8)
35*ddc0daeaSJilles Tjoelker 		abort();
36c7d813a9SEnji Cooper 	for (;;)
37*ddc0daeaSJilles Tjoelker 		pause();
38c7d813a9SEnji Cooper }
39