In recent versions of ksh, trap action DEBUG causes action to be executed just before each simple command the shell executes after that until the trap is removed. The DEBUG trap action is not inherited by subshells nor in functions. To get a better view of what is going on, you might want to try the following modification of your code:
Note that the compound variable .sh.command is the command that is about to be executed. The above script produces:
Last edited by Don Cragun; 09-21-2013 at 05:19 PM..
Reason: Fix typo
These 2 Users Gave Thanks to Don Cragun For This Post:
hi!!,
i wanna trap all Signal 10, 11, 15 generated by any process running on my server irrespective of the user and wanna write to a log file. Any ideas? Do this script need to be a root process??
:cool: (1 Reply)
Hello all,
I'm hoping to get a little insight from some of the wily veterans amongst you.
I've written a script to check for new outgoing files to our vendors located on our ssl server. It seems to be working ok, but the final question here, will be one of logic, and/or a better way to... (4 Replies)
Hi folks,
I have tried to add some trap detection in the below script....this script is used to monitor database activities...in a rather awkward way :rolleyes:....
The idea behind adding trap is that....this script creates lots of temporary files in the running folder to store the count... (1 Reply)
(posted this in the scripting forum as well, but figured it should go here) 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 process running, let's... (0 Replies)
How can use signals in a C program If i want a child program to signal it's parent program that it(child) program has completed the task that it was assigned.:confused: (2 Replies)
Hi all,
I have the c program that c program has to be in sleep mode.
I want write a script the it should trap the signal from the c program.
The signals are sighup,sigkill,sigterm,sigchld and then it has to go to sleep.
If signal is sigchld it has to do to some function.
My question is how to... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
That is the last reply I received from my instructor, and I'm looking for some alternatives.
When using... (2 Replies)
Hi All,
The problem statement is as below:
Problem: A process (exe) is getting executed in background. The output of this process is getting logged in a file. After successfully running for some time the process gets terminated. In the log file following is present:
^M[7m Interrupt ^M[27m... (8 Replies)
I am having issues with trap not working inside a script. I am currently trying this on a Knoppix system V 5.1. What I would like to happen is when I press control c, a message gets echoed and the script is ended. For example:
#! /bin/bash
trap "echo CTRL c was pressed ; break" SIGINT... (11 Replies)
Discussion started by: Basherrr
11 Replies
LEARN ABOUT DEBIAN
spadesimp
spadesimp(1)spadesimp(1)NAME
spadesimp - simplifies SPARK verification conditions
SYNOPSIS
spadesimp [OPTIONS] [UNIT]
DESCRIPTION
The Simplifier for SPARK, spadesimp, analyses verification conditions generated by the Examiner for SPARK and attempts to discharge them
automatically. For each vcg file read, the Simplifier will produce a siv (simplified vcs) file and an optional slg (simplifier log) file.
This manual page only summarises the spadesimp command-line flags, please refer to the full Simplifier manual for further information.
OPTIONS
These options do not quite follow the usual GNU command line syntax as options start with a single dash instead of the usual two.
-help Displays command line help.
-version
Displays version information.
-nolog Do not generate a simplification log file.
-log=file_spec
Specify filename for the simplification log file.
-nowrap
Do not line wrap output files.
-verbose
Display attempted simplification strategies.
-nouserrules
Do not use user rules.
-plain Adopt a plain output style (e.g. no dates or version numbers).
-typecheck
Only typecheck the input files.
-norenum
Do not renumber hypotheses and conclusions in siv files.
-nosimplification=RANGES, -nostandardisation=RANGES, -norule_substitution=RANGES, -nocontradiction_hunt=RANGES, -nosubstitution_elimina-
tion=RANGES, -noexpression_reduction=RANGES
Adjust strategy for different VCs. RANGES can be a comma separated list of ranges. Each range can be either a single VC number or a
simple range of the form VC-VC.
-complexity_limit=LIMIT
(Limit in range 10 .. 200)
-depth_limit=LIMIT
(Limit in range 1 .. 10)
-inference_limit=LIMIT
(Limit in range 10 .. 400)
SEE ALSO spark(1), sparksimp(1), zombiescope(1), victor(1), pogs(1)sparkformat(1), sparkmake(1)AUTHOR
This manual page was written by Florian Schanda <florian.schanda@altran-praxis.com> for the Debian GNU/Linux system (but may be used by
others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Ver-
sion 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover
Texts.
22 March 2011 spadesimp(1)