Sponsored Content
Full Discussion: signals related question
Top Forums Programming signals related question Post 302106965 by moshe fried on Tuesday 13th of February 2007 01:43:16 PM
Old 02-13-2007
If your question is what I think it is, if your proccess is within a system call or a library call, the signal can stop that call, and the call will return an error usually. Then you can check if the SIGALRM was set (or set through your own signal handler function) to decide what to do next.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

A Question related to the net

well, I was suggested to remove the contents of the cache as i get out of the browser netscape from the .netscape folder. is that really necessary? if so what are the rest to be done? can anybody please tell me?:rolleyes: (8 Replies)
Discussion started by: sskb
8 Replies

2. Programming

Unix/Linux Newbie(ish) Question - IPC/Signals

:) Hello, i have been given the following code to help me learn how to use signals, it won't compile. The problem maybe because this was written for use in Unix and i am trying to compile in Linux. The error i get says that SIGPIPE and SIG_IGN are undeclared. I think that these are defined... (2 Replies)
Discussion started by: theultimatechuf
2 Replies

3. UNIX for Advanced & Expert Users

One Question related to alias

Hello, I have created following alias in csh lab 'rlogin -l user23 complab23' but problem is complab23 does not allow automatic login by checking .rhosts file. So after typing lab on command line I have to type complicate password and if wrong password is typed thrice then account gets... (4 Replies)
Discussion started by: neerajrathi2
4 Replies

4. Shell Programming and Scripting

Question using signals in my own shell..

Wasn't really sure where to put this, since I'm using C in UNIX, but I am making my own shell... so, what's going on is this: For our program, we had to create our own shell, and if the user pressed ctrl-c just at the cmdline, then this signal would be ignored, but if there is a foreground... (1 Reply)
Discussion started by: blind melon
1 Replies

5. Shell Programming and Scripting

A question about signals in Unix

Whats a signal 0. An exhaustive search on signals landed me nowhere. Is it possible to do something like this trap "echo $var" 0. If so what signal does this trap catch ? (2 Replies)
Discussion started by: kinny
2 Replies

6. Shell Programming and Scripting

awk related question

awk "/^<Mar 31, 2012 : /,0" /app/blah.log can someone please help me figure out why the above command isn't pulling anything out from the log? basically, i want it to pull out all records, from the very first line that starts with the date "Mar 31, 2012" and that also has a time immediately... (4 Replies)
Discussion started by: SkySmart
4 Replies

7. Shell Programming and Scripting

Perl related question

hi, iam perl begginer,i have written the program #!/usr/bin/perl #use warnings; use strict; print "Enter the name:","\n"; my $name=<STDIN>; my %hash=(siva => "9902774481", dev => "9916391244", venky => "9440506760", manohar => "9440232695" ); print "$name no is:... (5 Replies)
Discussion started by: siva.hardwork
5 Replies

8. UNIX for Dummies Questions & Answers

Question related to 'ps'

If I run a script called 'abc.sh' and then execute the following : ps -ef | grep 'abc.sh' I always get two rows of output, one for the executing script, and the other for the grep command that I have triggered after the pipe. Questions: Why does the second row turn up in the results. My... (10 Replies)
Discussion started by: jawsnnn
10 Replies

9. Shell Programming and Scripting

awk related question

awk -F ";" 'FNR==NR{a=$1;next} ($2 in a)' server.list datafile | while read line do echo ${line} done when i run the above, i get this: 1 SERVICE NOTIFICATION: nagiosadmin skysmart-01.sky.net .... instead of: SERVICE NOTIFICATION: nagiosadmin skysmart-01.sky.net .... can... (4 Replies)
Discussion started by: SkySmart
4 Replies

10. UNIX for Dummies Questions & Answers

Question related to grep

We have huge file with control A as delimiter. Somehow one record is corrupted. This time i figured it out using ETL graph. If future , how to print only bad record. Example Correct record:... (2 Replies)
Discussion started by: srikanth38
2 Replies
siginterrupt(3) 					     Library Functions Manual						   siginterrupt(3)

Name
       siginterrupt - allow signals to interrupt system calls

Syntax
       siginterrupt(sig, flag)
       int sig, flag;

Description
       The  system call is used to change the system call restart behavior when a system call is interrupted by the specified signal.  If the flag
       is false (0), then system calls will be restarted if they are interrupted by the specified signal and no data  has  been  transferred  yet.
       System call restart is the default behavior on 4.2 BSD.

       If  the flag is true (1), then restarting of system calls is disabled.  If a system call is interrupted by the specified signal and no data
       has been transferred, the system call will return -1 with errno set to EINTR.  Interrupted system calls that have started transferring data
       will  return the amount of data actually transferred.  System call interrupt is the signal behavior found on 4.1 BSD and AT&T System V sys-
       tems.

       Note that the new signal handling semantics are not altered in any other way.  Most notably, signal handlers always remain installed  until
       explicitly  changed  by a subsequent call, and the signal mask operates as documented in Programs may switch between restartable and inter-
       ruptible system call operation as often as desired in the execution of a program.

       Issuing a call during the execution of a signal handler will cause the new action to take place on the next signal to be caught.

Environment
       This library routine uses an extension of the system call that is not available in ULTRIX 2.0 or earlier versions.  Hence it should not	be
       used if backward compatibility is needed.

Return Values
       A 0 value indicates that the call succeeded.  A -1 value indicates that an invalid signal number has been supplied.

See Also
       sigvec(2), sigblock(2), sigpause(2), sigsetmask(2)

4.3 Berkeley Distribution													   siginterrupt(3)
All times are GMT -4. The time now is 12:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy