EXIT(3F)EXIT(3F)NAME
exit - terminate process with status
SYNOPSIS
subroutine exit (status)
integer status
DESCRIPTION
Exit flushes and closes all the process's files, and notifies the parent process if it is executing a wait. The low-order 8 bits of status
are available to the parent process. (Therefore status should be in the range 0 - 255)
This call will never return.
The C function exit may cause cleanup actions before the final `sys exit'.
FILES
/usr/lib/libF77.a
SEE ALSO exit(2), fork(2), fork(3F), wait(2), wait(3F)4.2 Berkeley Distribution May 15, 1985 EXIT(3F)
Check Out this Related Man Page
EXIT(2) System Calls Manual EXIT(2)NAME
exit, _exit - terminate a process
SYNOPSIS
void _exit(int status)
DESCRIPTION
_exit terminates a process with the following consequences:
All of the descriptors open in the calling process are closed. This may entail delays, for example, waiting for output to drain; a
process in this state may not be killed, as it is already dying.
If the parent process of the calling process is executing a wait or is interested in the SIGCHLD signal (Minix-vmd), then it is
notified of the calling process's termination and the low-order eight bits of status are made available to it; see wait(2).
The parent process ID of all of the calling process's existing child processes are also set to 1. This means that the initializa-
tion process (see intro(2)) inherits each of these processes as well.
Most C programs call the library routine exit(3), which performs cleanup actions in the standard I/O library before calling _exit.
RETURN VALUE
This call never returns.
SEE ALSO fork(2), sigaction(2), wait(2), exit(3).
4th Berkeley Distribution May 22, 1986 EXIT(2)
I wonder if someone could help me here. I am trying to find a way of exiting from a loop but not exiting me from the script for example
#!/bin/ksh
# ************* FUNCTIONS ******************
function1() { #ping test
ping $1 2 > /dev/null
if ; then
... (13 Replies)
Having searched high and low through Oracles documentation, I came to think that they're very scripting-averse, as there's (apparently) no list of possible return/exit codes for their various command line utilities.
Is anyone here in possession of such a list, or knows where to find one? It... (16 Replies)
Hi Guys,
I have a script which takes reply from user and executes the corresponding scirpt. Below is the script
PS3 = 'Enter the options of your choice(x to exit)=>'
select useropt in 'List Processess' \
'List semaphores'
do
case $REPLY in
1) abc.sh
... (13 Replies)
Dear,
I have written below code to initiate the log at top of my script.
#Set the log file
LOGFILE=<path>/<filename.log>
exec > $LOGFILE 2>&1
...............
....
...
..
............
echo -e "\n\n Script finished OK " `date "+%m/%d/%y %H:%M:%S" ` "\n\n"
exit 0
the logging ends only... (14 Replies)
Hi there,
OK so I am super-green, but I have a problem I am hoping someone can help me with. I have a V245 that I am unable to install Solaris 10 (10/09) onto as during the initial install process, the UI pops up for region selection, but then as I enter my region, identify the system, up comes... (21 Replies)
Lois_Answer_Code=`sipsak -vv -s sip:192.168.1.3|grep -A 1 "reply received after"|grep SIP|awk '{print $2}'`How to find the exit status of | (12 Replies)
hi
i am new to shell scripting.
i was going thru the part option and arguments. on this section i fail to understand the use of exit 0 in below example .
#!/bin/sh
USAGE="Usage: $0 "
case "$1" in
-t) TARGS="-tvf $2" ;;
-c) TARGS="-cvf $2.tar $2" ;;
*) echo "$USAGE"
exit 0
;;
esac... (13 Replies)
I have just installed AIX 7.1 on a new system, and find that it displays the same annoying behaviour the you find in Linux:
In an xterm, when you quit vim or less, the file listed in the terminal window is blanked out and replaced with whatever was there before.
In vim there is a couple of... (12 Replies)
We are trying to design a flow so that an ETL job shouldn't start until the previous job completes. The script we have written is
while ; do sleep 2; done
The loop however exits even when the process is actually running. Why could this be happening? (12 Replies)
Hi
I have 3 files in total. file 1 is enriched.txt file2 is repressed.txt and file 3 is my content.txt
What i need is query the content file against both enriched and repressed and wherever the gensymbol is same in both the files then add a yes value against it
file1
Gene
ABC
XYZ
MNO... (12 Replies)
Hi,
I am getting scheduler log file on daily basis from windows box which contains job status and corresponding date, date is in windows format.
I wanted to write one script which will search the pattern (Exit code) for the today's date and if code is Zero then Job Success message should be... (14 Replies)
Heyas,
Since this question (similar) occur every now and then, and given the fact i was thinking about it just recently (1-2 weeks) anyway, i started to write something :p
The last point for motivation was... (17 Replies)
Hi,
I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed.
Below is my sample... (14 Replies)
How to return a exit code from a function and use it in conditional?
I tried the following but it does not seem to work.
tests.sh:
if test ./load.sh ; then
echo "0"
else
echo "1"
fi
load.sh:
return 1;
from command line:
$ ./tests.sh
0
I was expecting it to output "1"... (17 Replies)
Running Xubuntu 16.04 with shell version "GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)," I have a working script that consistently renames a Chrome window:
#!/bin/sh
while sleep 1; do
xdotool search --name chrome 2>/dev/null | while read id; do
xdotool set_window --name... (21 Replies)