Sponsored Content
Top Forums Programming how to discard instruction from previous signal Post 302342459 by nvhoang on Sunday 9th of August 2009 10:19:02 PM
Old 08-09-2009
Thank you matrixmadhan,

You're right. There would be potential bugs with the asynchronous signal approach. I'm thinking and trying shared memory for the problem.

Thank you all.

Best regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Case Instruction

Hi, this is my script to make a choice between 4 : clear echo " choose a profile and enter a number" echo echo " 1- oraSTT " echo echo " 2- appSTT " echo... (3 Replies)
Discussion started by: big123456
3 Replies

2. Solaris

what is that 1 in the instruction!~ (please help fast)

Hi all, make_lofs /.cdrom/<something>/<something> 1 what does this instruction mean? Note:both the "something" are obviously different . I would like to know what that 1 means, the rest of the instruction is clear!! Thanks (6 Replies)
Discussion started by: wrapster
6 Replies

3. Shell Programming and Scripting

sed discard chars after last _

Hi, I'd get fields like unix_linux_form_yyyyddmmhhmi.file.txt shell_programming_and_scripting.txt so on... and want them as below unix_linux_form shell_programming_and I could remove everything after a '.' as below echo $field | sed 's/\..*//' but how to remove... (14 Replies)
Discussion started by: dips_ag
14 Replies

4. Shell Programming and Scripting

ksh interrupt read instruction with signal

Dear shell experts, I spent last few days porting ksh script from ksh88/SunOS to ksh93/Linux. Basically, things are going well and I do not have too much troubles porting ks88 script to ksh93, but I stuck on one item. It's about sending and handling the signal. I found two similar... (8 Replies)
Discussion started by: bzk
8 Replies

5. Shell Programming and Scripting

how to find pattern and discard lines before it?

Hi all, I'd like to search a file for the first occurence of the phrase "PLASTICS THAT EXPIRE" and then discard all the lines that came before it. Output the remainder to a new file. Operating system is hp-ux. I've searched for usual awk and sed one liners but can't find a solution. Thank... (4 Replies)
Discussion started by: Scottie1954
4 Replies

6. Shell Programming and Scripting

Remove previous line if next & previous lines have same 4th character.

I want to remove commands having no output. In below text file. bash-3.2$ cat abc_do_it.txt grpg10so>show trunk group all status grpg11so>show trunk group all status grpg12so>show trunk group all status GCPKNYAIGT73IMO 1440 1345 0 0 94 0 0 INSERVICE 93% 0%... (4 Replies)
Discussion started by: Raza Ali
4 Replies

7. Shell Programming and Scripting

Cp –r instruction

Pleas I want answer to this question? Pleas help me A system administrator suspects that there is an attack on his machine; he needs to make a backup of the files to check when they have been modified. For this purpose he uses the "cp -r" instruction to copy the root directory. What is the... (1 Reply)
Discussion started by: tamer11007
1 Replies

8. Shell Programming and Scripting

Number some lines discard others?

Hi, I'd like to do an operation on text with a format like this this line shall be numbered this line shall not be numbered this line shall also be numbered this line shall not not be numbered And I want an output like this 1 this line shall be numbered this line... (6 Replies)
Discussion started by: jeppe83
6 Replies

9. Shell Programming and Scripting

Discard part of a file based on a pattern ---

I have the file: s3_T0(2) Pos "1" "2" s1_T1(2) Pos "1" "2" --- 0 0 1 0 0 1 1 1 --- 1 2 "tau0" 1 2 "h10" I want to patternmatch on --- and get only the third part i.e. 1 2 "tau0" 1 2 "h10" I wanted to start simple but even something like (5 Replies)
Discussion started by: eagle_fly
5 Replies

10. UNIX for Dummies Questions & Answers

Crunch character combination and discard similar content

Hi guys ! I generated the power set of the set S={a,b,c} using crunch: crunch 1 3 abc and get the 39 possible subsets: a b c aa ab ac ba bb bc ca cb cc … (2 Replies)
Discussion started by: beca123456
2 Replies
SIGNAL(3F)																SIGNAL(3F)

NAME
signal - change the action for a signal SYNOPSIS
integer function signal(signum, proc, flag) integer signum, flag external proc DESCRIPTION
When a process incurs a signal (see signal(3C)) the default action is usually to clean up and abort. The user may choose to write an alternative signal handling routine. A call to signal is the way this alternate action is specified to the system. Signum is the signal number (see signal(3C)). If flag is negative, then proc must be the name of the user signal handling routine. If flag is zero or positive, then proc is ignored and the value of flag is passed to the system as the signal action definition. In particu- lar, this is how previously saved signal actions can be restored. Two possible values for flag have specific meanings: 0 means "use the default action" (See NOTES below), 1 means "ignore this signal". A positive returned value is the previous action definition. A value greater than 1 is the address of a routine that was to have been called on occurrence of the given signal. The returned value can be used in subsequent calls to signal in order to restore a previous action definition. A negative returned value is the negation of a system error code. (See perror(3F)) FILES
/usr/lib/libU77.a SEE ALSO
signal(3C), kill(3F), kill(1) NOTES
f77 arranges to trap certain signals when a process is started. The only way to restore the default f77 action is to save the returned value from the first call to signal. If the user signal handler is called, it will be passed the signal number as an integer argument. 4.2 Berkeley Distribution May 15, 1985 SIGNAL(3F)
All times are GMT -4. The time now is 06:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy