genericopenlibs/openenvcore/libc/src/stdlib/_exit.c
changeset 31 ce057bb09d0b
child 34 5fae379060a7
equal deleted inserted replaced
30:e20de85af2ee 31:ce057bb09d0b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 /*
       
    18  * This file is in the public domain.  Written by Garrett A. Wollman,
       
    19  * 2002-09-07.
       
    20  *
       
    21  * $FreeBSD: src/lib/libc/stdlib/_Exit.c,v 1.1 2002/09/10 02:04:49 wollman Exp $
       
    22  */
       
    23 
       
    24 /*-
       
    25  * Redistribution and use in source and binary forms, with or without
       
    26  * modification, are permitted provided that the following conditions
       
    27  * are met:
       
    28  * 1. Redistributions of source code must retain the above copyright
       
    29  *    notice, this list of conditions and the following disclaimer.
       
    30  * 2. Redistributions in binary form must reproduce the above copyright
       
    31  *    notice, this list of conditions and the following disclaimer in the
       
    32  *    documentation and/or other materials provided with the distribution.
       
    33  * 4. Neither the name of the University nor the names of its contributors
       
    34  *    may be used to endorse or promote products derived from this software
       
    35  *    without specific prior written permission.
       
    36  *
       
    37  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
       
    38  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
       
    39  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
       
    40  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
       
    41  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
       
    42  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
       
    43  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
       
    44  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
       
    45  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
       
    46  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
       
    47  * SUCH DAMAGE.
       
    48  * © Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
       
    49  */
       
    50 
       
    51 
       
    52 
       
    53 #include <stdlib.h>
       
    54 #include <unistd.h>
       
    55 
       
    56 /*
       
    57  * ISO C99 added this function to provide for Standard C applications
       
    58  * which needed something like POSIX _exit().  A new interface was created
       
    59  * in case it turned out that _exit() was insufficient to meet the
       
    60  * requirements of ISO C.  (That's probably not the case, but here
       
    61  * is where you would put the extra code if it were.)
       
    62  */
       
    63 EXPORT_C
       
    64 void
       
    65 _Exit(int code)
       
    66 {
       
    67 	_exit(code);
       
    68 }