03-28-2002
Can you modify the source to the server? If so just have it write its PID to a file somewhere.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
My script - main.sh, execute program1.sh in background and program2.sh in foreground .
program1.sh holds the process ID of program2.
program1.sh after a while needs to move the process of program2.sh to background.
How? (0 Replies)
Discussion started by: avnerht
0 Replies
2. Shell Programming and Scripting
Hi Guys,
I am facing some weird problem with my shell script. The script shows up a menu and for every ontion internally calls a shell script which start/stop various servers. When I am using '&' while calling the internal shell script so that the server run in the background. For exiting... (1 Reply)
Discussion started by: agoyal
1 Replies
3. Solaris
I ran the Oracle 9i export command from a terminal to export out a big table using "exp andrew/password file=andrew.dmp log=andrew.log"
From the terminal I can see that the export is running as there is some output from the oracle export job. The export job is not complete yet. When i go check... (4 Replies)
Discussion started by: hippo2020
4 Replies
4. Shell Programming and Scripting
Hi,
I have a main script(main.ksh) within which I have called another script(sub.ksh). The sub.ksh script is made to run in the background using '&'. The main.ksh script logs the information in a logfile main_ddmmyy and the sub.ksh script also logs the information in the log file sub_ddmmyy.... (5 Replies)
Discussion started by: chella
5 Replies
5. Shell Programming and Scripting
hey all,
i am working on sun solaris machine and i want to start a process in background using shell script (actually i wanna start tomcat server using shell script). please dont tell me that append a & at last because this is not working in the shell script. i have also used nohup and... (8 Replies)
Discussion started by: dtomar
8 Replies
6. Shell Programming and Scripting
Hey all, I need to launch a script from within 2 other scripts that can run independently of the two parent scripts... Im having a hard time doing this, if anyone knows how please let me know.
More detail.
ScriptA (bash), ScriptB (ksh), ScriptC (bash)
ScriptA, launches ScriptB
ScirptB,... (7 Replies)
Discussion started by: trey85stang
7 Replies
7. UNIX for Dummies Questions & Answers
What I need to learn is how to use a script that launches background processes, and then kills those processes as needed.
The script successfully launches the script. But how do I check to see if the job exists before I kill it?
I know my problem is mostly failure to understand parameter... (4 Replies)
Discussion started by: holocene
4 Replies
8. Shell Programming and Scripting
Hi ,
I am running a backgorund process called hello.sh
./hello &
Now i need to capture the log file as it produces the output .
i am not able to use " >> " nor " tee " to capture the output file / log file .
Please let me know how can i do it ?
Regards,
Deepak Konnur (3 Replies)
Discussion started by: dskonnur
3 Replies
9. Shell Programming and Scripting
Hi,
I am using net::ftp for transferring files now i am trying in the same Linux server as a result ftp is very fast but if the server is other location (remote) then the file transferred will be time consuming.
So i want try putting FTP part as a background process. I am unaware how to do... (5 Replies)
Discussion started by: vanitham
5 Replies
10. Shell Programming and Scripting
Hi,
I have written a menu driven shell script in which as per the choice, I run the another script on background.
For eg:
1. get info
2)process info
3)modify info
All the operations have different scripts which i schedule in background using &.
However I wish to display the error... (0 Replies)
Discussion started by: ashima jain
0 Replies
LEARN ABOUT DEBIAN
dpid.h
dpid.h(3) libdaemon dpid.h(3)
NAME
dpid.h -
Contains an API for manipulating PID files.
SYNOPSIS
#include <sys/types.h>
Defines
#define DAEMON_PID_FILE_KILL_WAIT_AVAILABLE 1
This variable is defined to 1 iff daemon_pid_file_kill_wait() is supported.
Typedefs
typedef const char *(* daemon_pid_file_proc_t )(void)
Prototype of a function for generating the name of a PID file.
Functions
const char * daemon_pid_file_proc_default (void)
A function for creating a pid file name from daemon_pid_file_ident.
int daemon_pid_file_create (void)
Creates PID pid file for the current process.
int daemon_pid_file_remove (void)
Removes the PID file of the current process.
pid_t daemon_pid_file_is_running (void)
Returns the PID file of a running daemon, if available.
int daemon_pid_file_kill (int s)
Kills a running daemon, if available.
int daemon_pid_file_kill_wait (int s, int m)
Similar to daemon_pid_file_kill() but waits until the process died.
Variables
const char * daemon_pid_file_ident
Identification string for the PID file name, only used when daemon_pid_file_proc is set to daemon_pid_file_proc_default().
daemon_pid_file_proc_t daemon_pid_file_proc
A function pointer which is used to generate the name of the PID file to manipulate.
Detailed Description
Contains an API for manipulating PID files.
Definition in file dpid.h.
Define Documentation
#define DAEMON_PID_FILE_KILL_WAIT_AVAILABLE 1
This variable is defined to 1 iff daemon_pid_file_kill_wait() is supported. Since:
0.3
See also:
daemon_pid_file_kill_wait()
Definition at line 82 of file dpid.h.
Typedef Documentation
typedef const char*(* daemon_pid_file_proc_t)(void)
Prototype of a function for generating the name of a PID file.
Definition at line 37 of file dpid.h.
Function Documentation
int daemon_pid_file_create (void)
Creates PID pid file for the current process. Returns:
zero on success, nonzero on failure
Examples:
testd.c.
pid_t daemon_pid_file_is_running (void)
Returns the PID file of a running daemon, if available. Returns:
The PID or negative on failure
Examples:
testd.c.
int daemon_pid_file_kill (int s)
Kills a running daemon, if available. Parameters:
s The signal to send
Returns:
zero on success, nonzero on failure
int daemon_pid_file_kill_wait (int s, int m)
Similar to daemon_pid_file_kill() but waits until the process died. This functions is new in libdaemon 0.3. The macro
DAEMON_PID_FILE_KILL_WAIT_AVAILABLE is defined iff libdaemon supports this function.
Parameters:
s The signal to send
m Seconds to wait at maximum
Returns:
zero on success, nonzero on failure (timeout condition is considered a failure)
Since:
0.3
See also:
DAEMON_PID_FILE_KILL_WAIT_AVAILABLE
Examples:
testd.c.
const char* daemon_pid_file_proc_default (void)
A function for creating a pid file name from daemon_pid_file_ident. Returns:
The PID file path
int daemon_pid_file_remove (void)
Removes the PID file of the current process. Returns:
zero on success, nonzero on failure
Examples:
testd.c.
Variable Documentation
const char* daemon_pid_file_ident
Identification string for the PID file name, only used when daemon_pid_file_proc is set to daemon_pid_file_proc_default(). Use
daemon_ident_from_argv0() to generate an identification string from argv[0]
Examples:
testd.c.
daemon_pid_file_proc_t daemon_pid_file_proc
A function pointer which is used to generate the name of the PID file to manipulate. Points to daemon_pid_file_proc_default() by default.
Author
Generated automatically by Doxygen for libdaemon from the source code.
Version 0.14 17 Jan 2010 dpid.h(3)