Multiple instance of same process


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Multiple instance of same process
# 1  
Old 04-23-2009
Question Multiple instance of same process

SmilieHi 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 process-id of second.

Can anyone tell me what is the cause of this problem.
I dont want the new child process.


Can anyone please tell me the reason and solution to stop this.



Thanks in advance.

Glamo_2312
Image
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. UNIX for Advanced & Expert Users

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... (5 Replies)
Discussion started by: glamo_2312
5 Replies

8. 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

9. 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

10. 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
Login or Register to Ask a Question
FORK(2) 						      BSD System Calls Manual							   FORK(2)

NAME
fork -- create a new process LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> pid_t fork(void); DESCRIPTION
fork() causes creation of a new process. The new process (child process) is an exact copy of the calling process (parent process) except for the following: o The child process has a unique process ID. o The child process has a different parent process ID (i.e., the process ID of the parent process). o The child process has its own copy of the parent's descriptors. These descriptors reference the same underlying objects, so that, for instance, file pointers in file objects are shared between the child and the parent, so that an lseek(2) on a descriptor in the child process can affect a subsequent read(2) or write(2) by the parent. This descriptor copying is also used by the shell to establish standard input and output for newly created processes as well as to set up pipes. o The child process' resource utilizations are set to 0; see setrlimit(2). In general, the child process should call _exit(2) rather than exit(3). Otherwise, any stdio buffers that exist both in the parent and child will be flushed twice. Similarly, _exit(2) should be used to prevent atexit(3) routines from being called twice (once in the parent and once in the child). In case of a threaded program, only the thread calling fork() is still running in the child processes. Child processes of a threaded program have additional restrictions, a child must only call functions that are async-signal-safe. Very few functions are asynchronously safe and applications should make sure they call exec(3) as soon as possible. RETURN VALUES
Upon successful completion, fork() returns a value of 0 to the child process and returns the process ID of the child process to the parent process. Otherwise, a value of -1 is returned to the parent process, no child process is created, and the global variable errno is set to indicate the error. ERRORS
fork() will fail and no child process will be created if: [EAGAIN] The system-imposed limit on the total number of processes under execution would be exceeded. This limit is configuration-depen- dent. [EAGAIN] The limit RLIMIT_NPROC on the total number of processes under execution by this user id would be exceeded. [ENOMEM] There is insufficient swap space for the new process. SEE ALSO
execve(2), setrlimit(2), vfork(2), wait(2), pthread_atfork(3) STANDARDS
The fork() function conforms to ISO/IEC 9945-1:1990 (``POSIX.1''). HISTORY
A fork() system call appeared in Version 6 AT&T UNIX. BSD
June 10, 2004 BSD