Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Handling return & exit statements Post 302441816 by Scott on Monday 2nd of August 2010 12:46:09 PM
Old 08-02-2010
There's no reason why (if you're not using exit in the function), after the while-loop (and function) are finished control would not return to "script1".

It might be helpful if you posted the actual code - or a representative example - that doesn't work.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Move command return with exit code of 2

I have a script which loads data files into Oracle and then moves each file into a 'processed' directory when each file has finished loading. Last night I found that the script was failing on the mv statement (with a return code 2) and the following message, mv: cannot access... (1 Reply)
Discussion started by: handak9
1 Replies

2. UNIX for Dummies Questions & Answers

exit/return values

Sys: HP-UX 9000 In the calling script how do I 'read' the return/exit value of a called script?:confused: THX in advance for any assistence.:) (1 Reply)
Discussion started by: vslewis
1 Replies

3. HP-UX

Return of EXIT status ( $? )

I have the question: How return the exit code from then assign : VAR=$(command ) for ex. VAR=$(ls ....) VAREXIT=$? echo $VAREXIT VAREXIT is equal to 0 if the directory exist or not exist. WHI?? if i execute the command direct from line-command , the value of $? is different if... (1 Reply)
Discussion started by: ZINGARO
1 Replies

4. Shell Programming and Scripting

Gen. Question - Script calls multiple programs - Return Code Handling?

General Question: If a script calls multiple external programs (external to the script, but still on unix), where do the return codes go? Let's say one of external programs fails, does the entire script fail and send a non-zero return code to the job scheduling software, or is the return code sent... (1 Reply)
Discussion started by: jnanasakti
1 Replies

5. Shell Programming and Scripting

command does not return exit status due to tee

Hi, I am using /bin/sh. I want to display the stdout and stderr on the terminal as well as save it in a file, so I'm using this command. gmake all 2>&1 | tee log But even if gmake fails, it's always giving 0 as exit status, i suppose because of tee. # false 2>&1 | tee Log # echo $? 0... (2 Replies)
Discussion started by: anand_bh
2 Replies

6. Shell Programming and Scripting

Not able to exit from case statements

Hi all, I wrote the following simple shell script to perform addition, subtraction, multiplication and division. In the below program, i am not able to exit from the script Shell Script ----------- #!/bin/sh bgcal() { cal="" echo "Enter the Option Number: \c" read cal if then... (3 Replies)
Discussion started by: uxpassion
3 Replies

7. Shell Programming and Scripting

Nested if statements with && and ||?

Hello, I'm a shell scripting noob and new to this forum as well. My question is can nested if statements be done with && and || instead and if it can be done can someone provide an example pls. Thanks in advance for the help (1 Reply)
Discussion started by: zomgshellscript
1 Replies

8. Shell Programming and Scripting

Problem with call of Java Programm & return code handling & output to several streams.

Hello Everybody, thanks in advance for spending some time in my problem. My problem is this: I want to call a java-Programm out of my shell skript, check if die return code is right, and split the output to the normal output and into a file. The following code doesn't work right, because in... (2 Replies)
Discussion started by: danifunny
2 Replies

9. Shell Programming and Scripting

Need the difference between exit 1 & exit 7

Hi In one of the script I am seeing some thing like exit 7,exit 1,exit 2,exit 3,exit 9,exit6.What is the difference between all of this exit.Can anyone help here please (3 Replies)
Discussion started by: ginrkf
3 Replies

10. Programming

Return or exit codes apart from 0 have a meaning?

The standard return code when everything goes right is 0, but what about using any other number something happened? Are there "ranges" depending on the kind of problem you want to express or is totally up to the programmer? (3 Replies)
Discussion started by: Tribe
3 Replies
EvmCallback(5)							File Formats Manual						    EvmCallback(5)

NAME
EvmCallback - Event Management callback function SYNOPSIS
void EventCB( EvmConnection_t connection, EvmCallbackArg_t callbackArg, EvmCallbackData_t *callbackData) DESCRIPTION
An EVM callback function is a function that you provide to allow your program to handle messages arriving on an EVM connection. Most mes- sages will be incoming events or responses to requests you have made to the EVM daemon, but you may also get a callback for other reasons. You specify the name (EventCB) of the callback function in the callback parameter when you create an EVM connection with a response mode of callback. Your callback function is invoked by EvmConnDispatch(), which you must call whenever you detect activity pending on the connection. An EVM callback function must conform to the prototype shown. Callback function parameters: The connection parameter contains the connection context pertaining to this callback. This value was returned by EvmConnCreate() when the connection was created. If you have one callback function servicing multiple connections, you might test this to determine which connection a particular invocation is handling. The callbackArg parameter contains the value you specified as the callbackArg parameter to EvmCon- nCreate() when you created the connection. For example, you might use it to hold a pointer to your own context data for the connection. The callbackData parameter points to a structure containing the details of the callback. The structure includes a callback reason code, an event, and a union containing data specific to each possible reason. The event member may contain NULL if it is not applicable to the rea- son. You may get these reasons: This callback reason indicates that the daemon was unable to deliver one or more events, probably because the client process had not finished processing earlier events, causing the connection buffer to overflow. If necessary, you can use Evm- ConnControl(3) to increase the size of the receive buffer. This callback reason indicates that an EVM event has been received from the daemon. The event is available in the callbackData structure. You must use EvmEventDestroy(3) to free the event when you have finished with it. This callback reason indicates that a prior EvmEventPost() call has completed, usually with a response from the daemon if the responseMode was specified as EvmRESPONSE_CALLBACK when the connection was created. The posting status is available in the callbackData structure. This callback reason indicates that a requested template has been delivered in response to an EvmConnRegistrationGet() request. You must use EvmEventDestroy(3) to free the template when you have finished with it. This callback reason indicates that a prior EvmEventSubscribe() call has completed, usually with a response from the daemon. This callback reason indicates that event template infor- mation has been delivered in response to an EvmConnTemplateScan() request. The template is available in the callbackData structure. You must use EvmEventDestroy(3) to free the template when you have finished with it. See the Common Desktop Environment: Programmer's Guide for examples of callback functions. FILES
Header file that contains the event declaration, structures, and prototype for the callback function SEE ALSO
Routines: EvmConnCreate(3), EvmConnCheck(3), EvmConnSubscribe(3), EvmEventPost(3) Event Management: EVM(5) Event Connection: EvmConnection(5) EVM Events: EvmEvent(5) Common Desktop Environment: Programmer's Guide delim off EvmCallback(5)
All times are GMT -4. The time now is 05:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy