Sponsored Content
Top Forums Shell Programming and Scripting --killing backround Procs spawned from the parent script with Ctrl+C trap Post 303040276 by Neo on Friday 25th of October 2019 09:57:04 PM
Old 10-25-2019
Please enlighten us with the exact operating system / distribution / version you are using?
 

10 More Discussions You Might Find Interesting

1. AIX

Disable ctrl-c,ctrl-d,ctrl-d in ksh script

I wrote a ksh script for Helpdesk. I need to know how to disable ctrl-c,ctrl-z,ctrl-d..... so that helpdesk would not be able to get to system prompt :confused: (6 Replies)
Discussion started by: wtofu
6 Replies

2. UNIX for Dummies Questions & Answers

forking and killing parent processes

Hi everybody, I'm having some problems wiriting a program in UNIX using the "fork" and "kill" system calls. I have to create a C program P0, which creates 9 other processes P1, P2, ..., P9, where P0 is the father of P1, P1 the father of P2, and so on. All the processes contain an infinite... (0 Replies)
Discussion started by: davewilliams20
0 Replies

3. Shell Programming and Scripting

Killing parent shells from subshells (KSH)

Hi all, I have a shell script which calls other shell scripts, depending on the input. Within a.sh, I have a command which calls b.sh (ie. ksh b.sh) Normally, we use the exit function to terminate a shell. However, if I choose to call exit from b.sh, I will return to the parent shell who... (4 Replies)
Discussion started by: rockysfr
4 Replies

4. UNIX for Advanced & Expert Users

trap ctrl c in shell script

how to trap the ctrl c in unix shell script my script is running in while loop it should not be terminate with ctrl c. if i press ctrl c while running script it shloud ignore the same. please healp.......... thanks in advance (2 Replies)
Discussion started by: arvindng
2 Replies

5. UNIX for Advanced & Expert Users

Child Killing Parent

Hi all, I am writing a script which calls other third party scripts that perform numerous actions. I have no control over these scripts. My problem is, one of these scripts seems to execute and do what it is meant to do, but my calling / parent script always exits at that point. I need to... (4 Replies)
Discussion started by: mark007
4 Replies

6. Shell Programming and Scripting

trap CTRL-C problem

I am trying to trap CTRL-C, now the program I call has it's own exit message, I think this is the problem .. This is what I have now : function dothis { echo 'you hit control-c' exit } function settrap { trap dothis SIGINT } settrap until false; do ./ITGRecv.exe doneDoing this I... (2 Replies)
Discussion started by: Pmarcoen
2 Replies

7. Shell Programming and Scripting

Trap CTRL-C and background process

Hello, I have a script which copies via scp several large files to a remote server. What I want is that even if someone hits CTRL-C, the scp commands continues till the end. Here is what I wrote #! /bin/bash function testFunction { echo "COPY START" scp large.tar.gz... (11 Replies)
Discussion started by: RobertFord
11 Replies

8. Shell Programming and Scripting

KSH to execute stored procs/ctrl files

I am needing to call sqlplus and sqlldr in the same korn shell script. Below are the steps that I need to accomplish. I am new to Oracle shell scripting so an example would be great. CBOB_LOAD.KSH - script name Calls Oracle stored procedure sp_CBOB_CLEAR_LN_STAGING (SERVER: TESTSVR100) Calls... (0 Replies)
Discussion started by: acewilli
0 Replies

9. Shell Programming and Scripting

Help with getting a Ctrl-C trap working w/ a piped tail -f...

Hi All, Although each line below seems to work by itself, I've been having trouble getting the Control-C trap working when I add the "|perl -pe..." to the end of the tail -f line, below. (That |perl -pe statement basically just adds color to highlight the word "ERROR" while tailing a log... (2 Replies)
Discussion started by: chatguy
2 Replies

10. Shell Programming and Scripting

Trap killing PID

Hi, Just wonder if there is a way to identify the PID of the killing process using trap. Please let me know possible solution. #!/bin/ksh hello () { print "in hello"; print "PID of process issued SIGNAL"; --> this is what i'm looking for. } trap hello SIGKILL SIGTERM while... (3 Replies)
Discussion started by: Gajendra_PH
3 Replies
ELF_VERSION(3)						   BSD Library Functions Manual 					    ELF_VERSION(3)

NAME
elf_version -- retrieve or set ELF library operating version LIBRARY
ELF Access Library (libelf, -lelf) SYNOPSIS
#include <libelf.h> unsigned int elf_version(unsigned int version); DESCRIPTION
The elf_version() function is used to query the current operating version of the ELF library, and to inform the ELF library about the appli- cation's desired operating version. If the argument version is EV_NONE, the elf_version() function returns the currently configured operating version for the ELF library. If the argument version is not EV_NONE, and if argument version is supported by the ELF library, function elf_version() sets the library's operating version to version, and returns the previous value of the operating version. If argument version cannot be supported, then the elf_version() function returns EV_NONE. RETURN VALUES
The elf_version() function returns the currently configured ELF library version, or EV_NONE if an unsupported version is requested. EXAMPLES
An application program would inform the ELF library about its desired operating version and check for an error using the following code snip- pet: if (elf_version(EV_CURRENT) == EV_NONE) err(EX_SOFTWARE, "ELF library too old"); ERRORS
Function elf_version() may fail with the following error: [ELF_E_VERSION] An unsupported library version number was requested. SEE ALSO
elf(3), gelf(3) BSD
June 1, 2006 BSD
All times are GMT -4. The time now is 03:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy