exit man page on Xenix

Man page or keyword search:  
man Server   1130 pages
apropos Keyword Search (all sections)
Output format
Xenix logo
[printable version]



     EXIT(DOS)		      XENIX System V		     EXIT(DOS)

     Name
	  exit - Terminates the calling process.

     Syntax
	  #include <process.h>

	  void exit (status);

	  void _exit (status);

	  int status;

     Description
	  The exit and _exit functions terminate the calling process.
	  exit flushes all buffers and closes all open files before
	  terminating the process.  _exit terminates the process
	  without flushing stream buffers.  Status is typically given
	  the value 0 to indicate a normal exit and set to some other
	  value to indicate an error.

	  Although the exit and _exit calls do not return a value, the
	  low-order byte of status is made available to the waiting
	  parent process, if there is one, after the calling process
	  exits.  If there is no parent process waiting on the exiting
	  process, the status value is lost.

     Return Value
	  There is no return value.

     See Also
	  abort(S), exec(S), spawn(DOS)

     Page 1					      (printed 8/7/87)

     EXIT(DOS)		      XENIX System V		     EXIT(DOS)

     Example
	  #include <process.h> #include <stdio.h>

	  FILE *stream;
		.
		.
		.  /* The following statements cause the process to **
	  terminate, after flushing buffers and closing ** open files,
	  if another file cannot be opened.  */

	  if ((stream = fopen ("data","r")) == NULL) {	    perror
	  ("couldn't open data file");	    exit (1);	   }

	  /* The following statements cause the process to **
	  terminate immediately if a file cannot be opened.  */

	  if ((stream = fopen ("data","r")) == NULL) {	    perror
	  ("couldn't open data file");	    exit (1);	   }

     Notes
	  These calls must be compiled with the -dos flag.

     Page 2					      (printed 8/7/87)

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net