Sponsored Content
Top Forums UNIX for Advanced & Expert Users Multiple Instance Of Same Process Post 302310309 by glamo_2312 on Friday 24th of April 2009 09:24:58 AM
Old 04-24-2009
The program is not written in the way to spawn a new child process.Still the child is getting generated.Can you please now tell me as how to stop this.

Thanx in advance
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Multiple PHP sessions within the same browser instance

Dear all..... I am currently writing a Help-Desk / Knowledge Base application using PHP/PostGreSQL. I authenticate the user using a quite elaborate mechanism of cookies. The problem is that using cookies (I also have a version using sessions with the same problem), I can only seem to get one... (4 Replies)
Discussion started by: zazzybob
4 Replies

2. Shell Programming and Scripting

How to check if another instance of the process is running

Hi, I am writing a shell script to invoke a C++ program. Before I start the C++ program (oi7loadbalancer), I am checking if the process is already running. I start the process only if it is not already running. I have the following check in my script. proccount=`ps -f -u $USER_NAME | grep... (8 Replies)
Discussion started by: sim
8 Replies

3. Shell Programming and Scripting

Printing the Status of a Process in an Instance

Hi, I am executing the command: "./opmnctl status" to get the status of the processes in the instance. There are totally 5 processes that are avaialble, out of which 3 are "Alive" and 2 are "Down". How can I use the IF loop to get the status and echo it?? For instance I want to run a check... (8 Replies)
Discussion started by: yoursdavinder
8 Replies

4. UNIX for Dummies Questions & Answers

Multiple instance of same process

;)Hi Everyone, I am using solaris 5.10. I have a java process running in server mode in unix. The problem is that it automatically forks i.e creates a child process. I mean suddenly two instances of that process start running , in which the process-id of first instance is the parent... (0 Replies)
Discussion started by: glamo_2312
0 Replies

5. Shell Programming and Scripting

Help with multiple instance script checking

I am trying to debug the following script. It appears that when the check for script running occurs, it's finding the actual grep statement and causing the script believe the script is already running. This is deployed on two different servers where one works fine, the other doesn't. Any ideas? ... (2 Replies)
Discussion started by: DaddyMoose
2 Replies

6. Shell Programming and Scripting

A script that spawns multiple instance of itself.

Hi all,I have some questions of forking new process,the code is below.Any help will be appreciated. 1 #! /bin/bash 2 3 PIDS=$(pidof sh $0) 4 P_array=( $PIDS ) 5 echo $PIDS 6 let "instances = ${#P_array}-1" 7 8 echo "$instances instance(s)" of this script running." 9... (4 Replies)
Discussion started by: homeboy
4 Replies

7. Shell Programming and Scripting

Multiple instance in tomcat

I need to install a tomcat6 with multiple instances like instance1,instance2 and instance3 in a server. I came to know that for that we need to install tomcat6,apache2.0,mod_jk1.2 and jre with tools.jar installed.And we need to create multiple instances with same web.xml and difference... (0 Replies)
Discussion started by: tuxslonik
0 Replies

8. Shell Programming and Scripting

Process Instance not running properly.

I have run 10 instances of the process eg, process name is BG nohup /WP01IRB1_irbapp/IRBWPROD/RB/bin/BG -c 1 -t 23 -a '-caTop TESTBILLCYCLE='5FEB13_81PT19NPT''>a.txt & nohup /WP01IRB1_irbapp/IRBWPROD/RB/bin/BG -c 2 -t 23 -a '-caTop TESTBILLCYCLE='5FEB13_81PT19NPT''>b.txt & nohup... (3 Replies)
Discussion started by: ankitknit
3 Replies

9. UNIX for Advanced & Expert Users

How to check a single process instance is always running?

Hi, I want to write one program in C in Unix OS which will check the running status of a process time to time. If the process is stopped somehow by any means, it will ensure that the process is restarted and only one copy of the process image should run in memory at any point of time for the user.... (2 Replies)
Discussion started by: sanzee007
2 Replies

10. UNIX and Linux Applications

Configuring mysql for multiple instance only

Hello. I plan to use mysql with only instance database so I can stop one database for maintenance without stopping every thing. When one reads through the my.cnf config file, it is not clear if we must use at the same time a single database mysql plus any instances mysqld2 (for app1), mysqld3... (1 Reply)
Discussion started by: jcdole
1 Replies
POSIX_SPAWNATTR_SETFLAGS(3)				   BSD Library Functions Manual 			       POSIX_SPAWNATTR_SETFLAGS(3)

NAME
posix_spawnattr_setflags posix_spawnattr_getflags -- get or set flags on a posix_spawnattr_t SYNOPSIS
#include <spawn.h> int posix_spawnattr_setflags(posix_spawnattr_t *attr, short flags); int posix_spawnattr_getflags(const posix_spawnattr_t *restrict attr, short *restrict flags); DESCRIPTION
The posix_spawnattr_setflags() function sets the flags on the attributes object referenced by attr. The posix_spawnattr_getflags() function retrieves the flags on the attributes object referenced by attr. The argument flags is either 0 or a logical OR of one or more of the following flags: POSIX_SPAWN_RESETIDS If this bit is set, the child process will inherit the real (rather than the effective) user and group ID of the parent process. NOTE: This flag has no effect when the set-group bit is set on the process image being spawned. POSIX_SPAWN_SETPGROUP If this bit is not set, then the child process inherits the parent process group; if it is set, then the child process will behave as if the setpgid(2) function had been called with a pid parameter of 0 and a pgid parameter equal to the value of the spawn-pgroup value of the posix_spawnattr_t, as set by posix_spawnattr_setpgroup(3) POSIX_SPAWN_SETSIGDEF Signals set to either be caught or to the default action in the parent process will also be set to the default action in the child process. Signals set to be ignored in the parent process will be ignored in the child. However, if this bit is set, then signals in the spawn-sigdefault value of the posix_spawnattr_t, as set by posix_spawnattr_setsigdefault(3) which are caught or ignored in the parent will instead be reset to their default actions in the child. POSIX_SPAWN_SETSIGMASK If this bit is set, then the initial signal mask of the child process will be set to the spawn-sigmask value of the posix_spawnattr_t, as set by posix_spawnattr_setsigmask(3). POSIX_SPAWN_SETEXEC Apple Extension: If this bit is set, rather than returning to the caller, posix_spawn(2) and posix_spawnp(2) will behave as a more featureful execve(2). POSIX_SPAWN_START_SUSPENDED Apple Extension: If this bit is set, then the child process will be created as if it immediately received a SIGSTOP signal, permitting debuggers, profilers, and other programs to manipulate the process before it begins execution in user space. This permits, for example, obtaining exact instruction counts, or debugging very early in dyld(1). To resume the child process, it must be sent a SIGCONT signal. POSIX_SPAWN_CLOEXEC_DEFAULT Apple Extension: If this bit is set, then only file descriptors explicitly described by the file_actions argu- ment are available in the spawned process; all of the other file descriptors are automatically closed in the spawned process. RETURN VALUES
On success, these functions return 0; on failure they return an error number from <errno.h>. The posix_spawnattr_getflags() function addi- tionally, upon successful completion, makes the value pointed to by the flags argument equal to the spawn-flags attribute of the posix_spawnattr_t. ERRORS
These functions may fail if: [EINVAL] The value specified by attr is invalid. [EINVAL] The value of attr is invalid. SEE ALSO
posix_spawn(2), posix_spawnp(2), posix_spawnattr_init(3), posix_spawnattr_destroy(3), posix_spawnattr_setpgroup(3), posix_spawnattr_setsigdefault(3), posix_spawnattr_setsigmask(3), posix_spawn_file_actions_init(3), setpgid(2), signal(3), execve(2), dyld(1) STANDARDS
Version 3 of the Single UNIX Specification (``SUSv3'') [SPN] HISTORY
The posix_spawnattr_setflags() and posix_spawnattr_getflags() function calls appeared in Version 3 of the Single UNIX Specification (``SUSv3'') [SPN]. Mac OS X October 28, 2010 Mac OS X
All times are GMT -4. The time now is 03:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy