03-28-2015
then you have to define what you understand under "background", because ps -ef does what you asked for.
This User Gave Thanks to agent.kgb For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
How do you capture the return code from a background process?
I am dumping data to a fifo and then processing it in a c program.
I need to know that the sql finished successfully to ensure no missing data. Thanks.
ex.
sqlplus user/password < get_data.sql > data_fifo.txt &
bin/process_data... (2 Replies)
Discussion started by: korndog
2 Replies
2. Shell Programming and Scripting
hi there,
here's what i need in my korn-shell:
... begin korn-shell script
... nohup process_A.ksh ; nohup process_B.ksh &
... "other stuff"
... end lorn-shell script
in plain english i want process A and process B to run in the background so that the script can continue doing... (6 Replies)
Discussion started by: jacob_gs
6 Replies
3. Programming
Hey guys,
I am writing a very simple dummy shell in C++ and I am having trouble getting a process to run in the background. First of all, the shell has to recognize when I input a "&" at the end of the command, then it has to stick it in the background of the shell.
I understand that if I want... (6 Replies)
Discussion started by: icer
6 Replies
4. Linux
Hi!
First of all, let me warn you I'm quite new to the world of LINUX and Operating Systems understanding, so that's why I pose these newbie and stupid qustions...
Anyway, I'm trying to build my own simple shell in C and I'm getting some problems in implementing the background process ('&')... (10 Replies)
Discussion started by: neimaD
10 Replies
5. SuSE
I have installed oracle 10g on suse sles9. I do not see oracle background processes.
ps -ef|grep ora_ gives me environment variables junk.
ps -ef|grep smon does not show anything however database is up and running.
Any idea how to tweak that? (1 Reply)
Discussion started by: vijayasawant
1 Replies
6. Shell Programming and Scripting
I've got a bit of code I'm trying to work on...
What i want to happen is ... at all times have four parallel mysql dump and imports running.
I found the follow code snippet on the forum and modified it to work
by starting four concurrent processes but it waits until all four are done before... (7 Replies)
Discussion started by: dgob123
7 Replies
7. UNIX for Dummies Questions & Answers
Hi,
Inorder to improve the performance, I am trying to execute my command as a background process..
For eg: To zip large numbers of files present in a directory instead of using a single process, i do follow the below method:
gunzip -c > / &... (3 Replies)
Discussion started by: unni.raj
3 Replies
8. Solaris
Hi,
I need to establish a procedure that will start an application in background each time my remote Solaris server is (re)started. This would be a kind of daemon. I am no sysadmin expert, so I am looking for pointers.
How should I proceed? What are the main steps?
Thanks,
JVerstry (9 Replies)
Discussion started by: JVerstry
9 Replies
9. Shell Programming and Scripting
Ok guys so I have my first dummy shell almost done except for one tiny part: I do not know how to run a process in the background, from the code!
I already know how to do that in a normal shell:
$ program &
However, no clue when it comes to how to program that thing. :eek:
A very... (2 Replies)
Discussion started by: Across
2 Replies
10. Shell Programming and Scripting
Hi,
I have a schell script parent.ksh from which I am calling three background processes a.ksh,b.ksh and c.ksh. Once these three processes completes the next step in parent.ksh should execute. How to achieve this?
Please help me....
Thanks... (1 Reply)
Discussion started by: ravinunna
1 Replies
LEARN ABOUT MOJAVE
bgerror
bgerror(n) Tcl Built-In Commands bgerror(n)
__________________________________________________________________________________________________________________________________________________
NAME
bgerror - Command invoked to process background errors
SYNOPSIS
bgerror message
_________________________________________________________________
DESCRIPTION
Release 8.5 of Tcl supports the interp bgerror command, which allows applications to register in an interpreter the command that will han- |
dle background errors in that interpreter. In older releases of Tcl, this level of control was not available, and applications could con- |
trol the handling of background errors only by creating a command with the particular command name bgerror in the global namespace of an |
interpreter. The following documentation describes the interface requirements of the bgerror command an application might define to retain |
compatibility with pre-8.5 releases of Tcl. Applications intending to support only Tcl releases 8.5 and later should simply make use of |
interp bgerror.
The bgerror command does not exist as built-in part of Tcl. Instead, individual applications or users can define a bgerror command (e.g.
as a Tcl procedure) if they wish to handle background errors.
A background error is one that occurs in an event handler or some other command that did not originate with the application. For example,
if an error occurs while executing a command specified with the after command, then it is a background error. For a non-background error,
the error can simply be returned up through nested Tcl command evaluations until it reaches the top-level code in the application; then the
application can report the error in whatever way it wishes. When a background error occurs, the unwinding ends in the Tcl library and
there is no obvious way for Tcl to report the error.
When Tcl detects a background error, it saves information about the error and invokes a handler command registered by interp bgerror later
as an idle event handler. The default handler command in turn calls the bgerror command . Before invoking bgerror, Tcl restores the
errorInfo and errorCode variables to their values at the time the error occurred, then it invokes bgerror with the error message as its
only argument. Tcl assumes that the application has implemented the bgerror command, and that the command will report the error in a way
that makes sense for the application. Tcl will ignore any result returned by the bgerror command as long as no error is generated.
If another Tcl error occurs within the bgerror command (for example, because no bgerror command has been defined) then Tcl reports the
error itself by writing a message to stderr.
If several background errors accumulate before bgerror is invoked to process them, bgerror will be invoked once for each error, in the
order they occurred. However, if bgerror returns with a break exception, then any remaining errors are skipped without calling bgerror.
If you are writing code that will be used by others as part of a package or other kind of library, consider avoiding bgerror. The reason
for this is that the application programmer may also want to define a bgerror, or use other code that does and thus will have trouble inte-
grating your code.
EXAMPLE
This bgerror procedure appends errors to a file, with a timestamp.
proc bgerror {message} {
set timestamp [clock format [clock seconds]]
set fl [open mylog.txt {WRONLY CREAT APPEND}]
puts $fl "$timestamp: bgerror in $::argv '$message'"
close $fl
}
SEE ALSO
after(n), interp(n), tclvars(n)
KEYWORDS
background error, reporting
Tcl 7.5 bgerror(n)