sigsetjmp(3) Library Functions Manual sigsetjmp(3)Name
sigsetjmp, siglongjmp - nonlocal goto
Syntax
#include <setjmp.h>
sigsetjmp(env, savemask)
sigjmp_buf env;
void siglongjmp(env, val)
sigjmp_buf env;
Description
These routines deal with errors and interrupts encountered in a low-level subroutine of a program.
The subroutine saves its stack environment in env for later use by It returns a value of 0. If the value of the savemask argument is not
zero, the subroutine also saves the process' current signal mask as part of the calling environment.
The subroutine restores the environment saved by the last call of with the supplied env buffer. If the env argument was initialized by a
call to the subroutine with a nonzero savemask argument, the subroutine restores the saved signal mask. It then returns in such a way that
execution continues as if the call of had just returned the value val to the subroutine that invoked which must not itself have returned in
the interim. However, cannot cause to return the value 0. If is invoked with a val of 0, returns a value of 1. All accessible data have
values as of the time was called.
Restrictions
The subroutine does not save the current notion of whether the process is executing on the signal stack. When you invoke the subroutine,
the signal stack is left in an incorrect state.
See Alsosigstack(2), sigvec(2), signal(3), sigprocmask(3)sigsetjmp(3)
Check Out this Related Man Page
LONGJMP(3) Library functions LONGJMP(3)NAME
longjmp, siglongjmp - non-local jump to a saved stack context
SYNOPSIS
#include <setjmp.h>
void longjmp(jmp_buf env, int val);
void siglongjmp(sigjmp_buf env, int val);
DESCRIPTION
longjmp() and setjmp() are useful for dealing with errors and interrupts encountered in a low-level subroutine of a program. longjmp()
restores the environment saved by the last call of setjmp() with the corresponding env argument. After longjmp() is completed, program
execution continues as if the corresponding call of setjmp() had just returned the value val. longjmp() cannot cause 0 to be returned. If
longjmp is invoked with a second argument of 0, 1 will be returned instead.
siglongjmp() is similar to longjmp() except for the type of its env argument. If the sigsetjmp() call that set this env used a nonzero
savesigs flag, siglongjmp() also restores the set of blocked signals.
RETURN VALUE
These functions never return.
CONFORMING TO
POSIX
NOTES
POSIX does not specify whether longjmp will restore the signal context. If you want to save and restore signal masks, use siglongjmp.
longjmp() and siglongjmp() make programs hard to understand and maintain. If possible an alternative should be used.
SEE ALSO setjmp(3), sigsetjmp(3)
1997-03-02 LONGJMP(3)
Hi everyone,
Is there a variable or built in function in the Unix env. for me to obtain the name of a signal that is caught? As far as I understand only a numeric value of the signal is returned to the handler.
For example:
void handler (int signum)
{
... (2 Replies)
Hi,
I need to know the purpose of .profile,config and env file .
what is the 1)similarties
2)difference
between these 3.
If env is not a file, when we give command env we are getting some information, from where or which file we are getting this... (0 Replies)
A coworker of mine wants to add some environment variables to env file. Please advise how to do it. He couldn't use: more or vi on the file. Thanks. (3 Replies)
if i do this 5 times
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
il will a file called XX with the env redirected into it 5 times
i need to create a script that takes 1 argument being a file, in this instancei ll use the newly created file above xx read the inputted file, in this... (13 Replies)
I have a file called xx with the env redirected into it 5 times:
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
I have to read an input file (here: xx) and look for occurrences of the current user who is executing this script. Once finding an occurrence of the username I have to take that... (4 Replies)
I have a file called xx with the env redirected into it 5 times:
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
I have to read an input file (here: xx) and look for occurrences of the current user who is executing this script. Once finding an occurrence of the username I have to take that... (2 Replies)
Hi All,
in my HP-UX 11.11 , there is an parameter of SFTP_UMASK at env,
but How do we use it ?
I tried with type : SFTP_UMASK=022
and when I type : env
the SFTP_UMASK value has changed to 022 .
but when I send a file with use SFTP from other pc/server .
It still umask 077 (chmod... (4 Replies)
Hi,
I can not execute a .env file
$ . /Data/oracle/d03/mydbora/8.0.6/MYDB.env
-bash: /Data/oracle/d03/mydbora/8.0.6/MYDB.env: Permission denied
Even if :
-rwxrwxrwx 1 oracle dba 2903 Mar 5 2007 /Data/oracle/d03/mydbora/8.0.6/MYDB.env
Please help.
Many thanks. (1 Reply)
Hi,
I am basically new to signals in UNIX. My question is, should the signal() command be called only once in the program? What will happen if it's called multiple times? I am trying to write an alarm program where the signal handler function changes in runtime. It just doesn't work if I... (2 Replies)
Hi,
please help me.. in how to find out which env file is being called upon when an os user logs.
when i su - oracle , i would like to know which env is called, because i see many env files under the home dir..
thanks, (2 Replies)
Hi,
I am new to Unix and discovered this example problem online that I believe will help my learning:
Run the command's below
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
You will now have a file called XX with the env redirected into it 5 times
Create a script named... (2 Replies)
(Above from Apache docs).
On my system, using:
SetEnvIf User-Agent Mozilla IsBad=1
Order allow,deny
Allow from all
Deny from env=IsBad ...I see that environment variable is set (using phpinfo()) but the page is still served. No errors in the Apache logs. (1 Reply)