Unix Programming - Doubt on signal handler

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > July 2006 > Doubt on signal handler





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Doubt on signal handler
kiran

2006-07-18, 1:20 am

Hi,

If we define a signal handler to where the control will go after the
successful return from the signal handler ?

Thanks.

davids@webmaster.com

2006-07-18, 1:20 am


kiran wrote:
> Hi,
>
> If we define a signal handler to where the control will go after the
> successful return from the signal handler ?
>
> Thanks.


Back to whatever was interrupted by the signal.

DS

Thomas Maier-Komor

2006-07-18, 7:27 am

davids@webmaster.com wrote:
> kiran wrote:
>
> Back to whatever was interrupted by the signal.
>
> DS
>


Quite so. But it is worth to notice that when the process is currently
executing a system call (e.g. open), the system call will be interrupted
by the signal. I.e. the system call will be aborted, return -1 to its
caller, and errno will be set to EINTR.

Tom
Barry Margolin

2006-07-19, 1:23 am

In article <e9i9ii$bj0$1@news.in.tum.de>,
Thomas Maier-Komor <thomas@maier-komor.de> wrote:

> davids@webmaster.com wrote:
>
> Quite so. But it is worth to notice that when the process is currently
> executing a system call (e.g. open), the system call will be interrupted
> by the signal. I.e. the system call will be aborted, return -1 to its
> caller, and errno will be set to EINTR.


That depends on the system call and whether the signal disposition is
set to restart system calls.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com