Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sigreturn(2) [freebsd man page]

SIGRETURN(2)						      BSD System Calls Manual						      SIGRETURN(2)

NAME
sigreturn -- return from signal LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <signal.h> int sigreturn(const ucontext_t *scp); DESCRIPTION
The sigreturn() system call allows users to atomically unmask, switch stacks, and return from a signal context. The thread's signal mask and stack status are restored from the context structure pointed to by scp. The system call does not return; the users stack pointer, frame pointer, argument pointer, and processor status longword are restored from the context. Execution resumes at the specified pc. This system call is used by the trampoline code and longjmp(3) when returning from a signal to the previously executing program. RETURN VALUES
If successful, the system call does not return. Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
The sigreturn() system call will fail and the thread context will remain unchanged if one of the following occurs. [EFAULT] The scp argument points to memory that is not a valid part of the process address space. [EINVAL] The process status longword is invalid or would improperly raise the privilege level of the process. SEE ALSO
sigaction(2), setjmp(3), ucontext(3) HISTORY
The sigreturn() system call appeared in 4.3BSD. BSD
September 6, 2013 BSD

Check Out this Related Man Page

SIGRETURN(2)						     Linux Programmer's Manual						      SIGRETURN(2)

NAME
sigreturn - return from signal handler and cleanup stack frame SYNOPSIS
int sigreturn(unsigned long __unused); DESCRIPTION
When the Linux kernel creates the stack frame for a signal handler, a call to sigreturn() is inserted into the stack frame so that upon return from the signal handler, sigreturn() will be called. This sigreturn() call undoes everything that was done--changing the process's signal mask, switching stacks (see sigaltstack(2))--in order to invoke the signal handler: it restores the process's signal mask, switches stacks, and restores the process's context (registers, pro- cessor flags), so that the process directly resumes execution at the point where it was interrupted by the signal. RETURN VALUE
sigreturn() never returns. FILES
/usr/src/linux/arch/i386/kernel/signal.c /usr/src/linux/arch/alpha/kernel/entry.S CONFORMING TO
sigreturn() is specific to Linux and should not be used in programs intended to be portable. NOTES
The sigreturn() call is used by the kernel to implement signal handlers. It should never be called directly. Better yet, the specific use of the __unused argument varies depending on the architecture. SEE ALSO
kill(2), sigaltstack(2), signal(2), signal(7) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-06-26 SIGRETURN(2)
Man Page

15 More Discussions You Might Find Interesting

1. Programming

C++ using system()

I'm attempting to execute a system command contained within a variable, such as; abfile = "fred" abdest = "/home" ab = "scp " + abfile + abdest; system(ab); abfile & abdest will be populated via a prompt so will differ each time the script is run. The system command does not do anything... (8 Replies)
Discussion started by: gefa
8 Replies

2. Shell Programming and Scripting

scp output fm script won't go to file

Have a script that scp's tar file to multiple other servers in a for loop. Need to set monitoring and notification on it for when it fails. Running this line of code in a 'for' loop... scp $SOURCE_RECOVERY_TARFILE ${HOST}:${CURR_RECOV_TARFILE} 2>&1 | tee ${MONFILE} Their are two outputs... (7 Replies)
Discussion started by: nmikes
7 Replies

3. Shell Programming and Scripting

What is scp-ed over?

Hi all, i have a directory in server A. the directory path is /home/kevin. I need to scp the directory to another server B. i would like to ask, when i do a scp of the /home/kevin , i can expect all the files from A to go B. However, how about the hidden files? for example the ssh keys in the... (4 Replies)
Discussion started by: new2ss
4 Replies

4. HP-UX

= of /etc/system

I have multiple HPUX boxes all with the same kernel settings, is there a HP-UX equivalent of /etc/system that i can scp over to the other servers so I can automate this? (8 Replies)
Discussion started by: csaunders
8 Replies

5. AIX

scp Unable to authenticate. Communication error.

I'm having this issue on one of my AIX box, whenever I try to do scp it asks for user, domain and password and just errors out, scp works fine on other AIX servers. I already checked the permissions of .sshd and its files, stopped and restarted sshd subsystem. Also it never asks for user, domain... (5 Replies)
Discussion started by: barkath
5 Replies

6. Shell Programming and Scripting

Any way to make scp more powerful?

Hello, I'm writing a script to automate the delivery of our code to different target environments and I was wondering if there's any way to cut down on the number of authentications that are needed. The script has to deliver to three different boxes (two directories on two boxes and one... (11 Replies)
Discussion started by: pallak7
11 Replies

7. Solaris

scp prompt when home directory is 777

Morning all, I was running some deployment scripts on Friday night that kept failing because it prompted for a password for a user I was already sudo'd in as when trying to scp a file onto itself. e.g. on server 51.123.123.123 as sudo dlam typing: scp testfile dlam@51.123.123.123:/tmp ... (5 Replies)
Discussion started by: dlam
5 Replies

8. Shell Programming and Scripting

find -exec scp

Hello, I'm facing a problem with a command that works on Linux but not on Unix (Solaris 10). I want to find files and scp then to another server. This command is: find /path -type f -exec scp {} root@node000C76211737:{} \; All the files are found correctly but it looks like the last... (7 Replies)
Discussion started by: Tex-Twil
7 Replies

9. UNIX for Dummies Questions & Answers

scp without password - NT to UNIX

Hi guys, I wasn't sure which thread to include this one in (unix or shell scripting) but chose here based on search results. I need to automate a process which requires the need to transfer a file from a machine running on NT to the database server on UNIX. I've found this and a number of other... (7 Replies)
Discussion started by: Dird
7 Replies

10. News, Links, Events and Announcements

need help using scp on putty

I am trying to download a file from my server onto my Win XP Pro machine using the scp command in putty, but am having problems. I tried this: scp filename-to-download c:\temp But it says: c: Name or service not known Any help would be appreciated. (4 Replies)
Discussion started by: jsherk
4 Replies

11. Windows & DOS: Issues & Discussions

scp Command from Linux to Windows

Hi Everyone, I am trying to use the basic scp command in Linux to transfer a file over to a windows system, my syntax is as follows: scp <filename> <username)@<serveraddress>:directory. But the command keeps timing out. Any one have any thoughts? Thanks in advance! (5 Replies)
Discussion started by: twhitmarsh
5 Replies

12. UNIX and Linux Applications

Need help with scp

Hi, I am trying to do scp from server A to server B. But while doing the scp i am getting the following message. +-----------------------------------------------------------------+ | This system is for the use of authorized users only. | | Individuals using this computer system... (6 Replies)
Discussion started by: sidh_arth85
6 Replies

13. Shell Programming and Scripting

Rename file while scp'ing

Hi, I am scp'ing set of files listed in file list with the following code: for i in `cat ${SCPFILELISTDIR}/${SCPFILELIST}`; do scp ${LOCALDIR}/$i ${REMOTESRVR}:${REMOTEDIR} if ]; then echoen "${LOCALDIR} transferred to ${REMOTESRVR}:${REMOTEDIR}... (7 Replies)
Discussion started by: pinnacle
7 Replies

14. UNIX for Dummies Questions & Answers

scp to get a file from windows desktop to UNIX server

Hi, I want to use scp to upload file to my unix server. i am using this: scp D:\testr.txt unixuser@unixhost:/path it returns an error: ssh: D: host/servname not known i am not sure how to tell path of my D drive in the command and how will command understand it has to pick from my... (5 Replies)
Discussion started by: Kohli
5 Replies

15. Shell Programming and Scripting

Can't solve a simple SSH/scp issue.. Please help.

Disclaimer: I tried searching but wasn't able to get to the answer so please don't flame. Scenario: I have a root script that generates a file on box1 and then needs to scp it over to box2 using user1. Both boxes are running open-ssh. root@locat-host# scp /tmp/file1 user1@box2:/tmp/file1 ... (10 Replies)
Discussion started by: denissi
10 Replies