Sponsored Content
Operating Systems Linux Red Hat Killing child daemon started by parent process Post 302414229 by jw_amp on Monday 19th of April 2010 02:12:32 PM
Old 04-19-2010
thanks jim .....

In the mean time few more clarity on this issue ..............

--------------jserver-start.sh (Wrapper)-----------------
#!/bin/sh
#jserver-start.sh
sh /usr/jdserver/bin/jserver.sh > /dev/null 2>&1 &
------------------------------------------------------

Also, w.r.t your comments, the "-jserver-start.sh " will get killed automatically after spawing the daemon. right?

Here, the "jserver.sh" (The actual java Server), executes few code & then execute the the Java Server's Main class.

Also, I have a service (service-jserver.sh), which I placed in /etc/init.d (to run as a startup & running finely as a daemon while startup), having a "start" function, which actually calls this Wrapper Shell script (jserver-start.sh). Also, I have a "stop" function, which kill this process, by calling another shell script "jserver-stop.sh" & has the following code:
--------------jserver-stop.sh-------------------------
#!/bin/bash
#jserver-stop.sh
kill `ps -ef | grep jserver-start.sh | grep -v grep | awk '{ print $2 }'`
-----------------------------------------------------

Here, I would like to know which process shall I kill:
1.) The Wrapper (jserver-start.sh) Or 2.) Directly "jserver.sh" ?
But, while executing "service jserver-stop stop", it is not killing the service and the server is still running.

Any clue? Please suggest.

Last edited by jw_amp; 04-19-2010 at 03:30 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

killing a child process within a shell

Hi All, I have a written a script in korn shell for importing data into a oracle database. The shell invokes the import within the script. I want to kill this import (child process) . I tries using trap, but this does not kill the import even if i press cnt c. i have to login into other terminal... (2 Replies)
Discussion started by: yerics
2 Replies

2. Programming

Child process is not getting started

Hi, When i m trying to run below code,its entering into wait stage. output: In parent pid=2134 // some random value assigned to child process parent waiting..... and then it keeps on waiting for child to get terminate Y this child is not getting... (5 Replies)
Discussion started by: Crab
5 Replies

3. Shell Programming and Scripting

killing a child process

I am calling another script from my main script and making it run in the background,based upon the value of the input provided by the user I want to kill the child process ,I have written this code timer.ksh & PID=$$ print "\n Do you wish to continue .. (Y/N) : \c " read kill_proc if ]... (4 Replies)
Discussion started by: mervin2006
4 Replies

4. Shell Programming and Scripting

Killing child process in ksh

I have a script that (ideally) starts tcpdump, sleeps a given number of seconds, then kills it. When I do this for 10 seconds or and hour, it works fine. When I try it for 10 hours (the length I actually want) it just doesn't die, and will actually stick around for days. Relevant part of my... (1 Reply)
Discussion started by: upnix
1 Replies

5. UNIX for Advanced & Expert Users

Child Killing Parent

Hi all, I am writing a script which calls other third party scripts that perform numerous actions. I have no control over these scripts. My problem is, one of these scripts seems to execute and do what it is meant to do, but my calling / parent script always exits at that point. I need to... (4 Replies)
Discussion started by: mark007
4 Replies

6. Shell Programming and Scripting

How to make the parent process to wait for the child process

Hi All, I have two ksh script. 1st script calls the 2nd script and the second script calls an 'C' program. I want 1st script to wait until the 'C' program completes. I cant able to get the process id for the 'C' program (child process) to make the 1st script to wait for the second... (7 Replies)
Discussion started by: sennidurai
7 Replies

7. Shell Programming and Scripting

[KSH/Bash] Starting a parent process from a child process?

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

8. Emergency UNIX and Linux Support

signal between parent process and child process

Hello, everyone. Here's a program: pid_t pid = fork(); if (0 == pid) // child process { execvp ...; } I send a signal (such as SIGINT) to the parent process, the child process receive the signal as well as the parent process. However I don't want to child process to receive the... (7 Replies)
Discussion started by: jackliang
7 Replies

9. Shell Programming and Scripting

forking a child process and kill its parent to show that child process has init() as its parent

Hi everyone i am very new to linux , working on bash shell. I am trying to solve the given problem 1. Create a process and then create children using fork 2. Check the Status of the application for successful running. 3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies

10. Solaris

Child killing parent process and how to set up SMF

Hello, A little background on what we are doing first. We are running several applications from a CLI, and not all of them are fully functional. They do on occasion core dump, not a problem. We are running a service that takes a screen scrape of those apps and displays them in a more user... (5 Replies)
Discussion started by: Bryan.Eidson
5 Replies
wnnudmerge(1M)						  System Administration Commands					    wnnudmerge(1M)

NAME
wnnudmerge - Wnn6 registered words automatic merge module SYNOPSIS
/usr/lib/locale/ja/wnn/wnnudmerge [-n] [-f file] [-j file] DESCRIPTION
wnnudmerge merges words that are registered in multiple user dictionaries into a single dictionary. The merge method is defined in the /etc/lib/locale/ja/wnn/udmergerc file. Note that wnnudmerge should be run as part of the tasks performed by wnnoffline. Do not run wnnud- merge independently. OPTIONS
The following options are available. -n wnnudmerge checks the udmergerc file. Does not merge dictionaries. -f file Reads file as initialization file instead of the default udmergerc file. -j file Uses file as initialization file for Wnn6 Kana-Kanji conversion server (jserver) instead of the default jserverrc file. FILES
/etc/lib/locale/ja/wnn/udmergerc ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWjwnsu | +-----------------------------+-----------------------------+ SEE ALSO
jserver(1M), wnnoffline(1M) SunOS 5.10 10 Jan 2003 wnnudmerge(1M)
All times are GMT -4. The time now is 10:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy