make sense and corrected the script(though earlier it was running fine (), don't know how).
Currently I'm trying to get the command I'm running using below sample test script:
Output:
Still I'm not getting the command, so that I can awk'ed the passed argument and put into a file. So the logic will be:
Once I'll restart script:
if this new file exist
take this new file
else
use old config file
once successfully done, I'll remove the error file (if any). Please suggest if this feasible.
Hi All,
I am working on solaris 8 sparc machine with 2 cpu.
I am trying to run my application which generates files. I run multiple instance of the application, but the results don't seem to show as if it were runing parallely.
When i run the application once it takes 12 secs to generate a... (1 Reply)
Hi
I want to run two shell script files parallely. These two scripts are interacting with the database. can any body help on this Pls
Regards
Audippa naidu.M (3 Replies)
Hi
I am looking for some kind of feature in unix that will help me write a script that can invoke multiple processes in parallel. And make sure that the multiple parallel processes complete successfully before I proceed to the next step.
Someone suggested something called timespid or... (6 Replies)
hi i am preparing a set of batches for a set of files sequentially
There is a folder /xyz where all the files reside
now all the files starting with
01 - will be appended for one below other to form a batch batch01
then all the files starting with
02 - will be appended for one below other to... (7 Replies)
Hello everybody,
I have a little problem with one of my program. I made a plugin for collectd (a stats collector for my servers) but I have a problem to make it run in parallel.
My program gathers stats from logs, so it needs to run in background waiting for any new lines added in the log... (0 Replies)
Hello
I have a shell script with multiple sections in it. Like, verify pre-requisites, ch co version, stop services , install product , post migration steps, start services, send status email.
If the script fails at certain step, (like after product installation) it can't be re-run since the... (2 Replies)
I have 10,000 + files, each of which I need to zip using bzip2.
Is ti possible to use bash to create 8 parallel streams sending a new file to be processed from the list when one of the others has finished? (1 Reply)
Discussion started by: garethsays
1 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)