07-03-2002
identify parent process in ps?
I need to write a script to monitor user processes that revert to parent process id = 1
I can do this with a grep " 1 " or awk and evaluation.
but
Is there a switch on the ps command or another command to specify parent id on proccesses?
I tried ps with the -p ppid=nnnnn but it doesnt seem to work.
thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how to find the chid process id from given parent process id.... (the chid process doesnot have sub processes inturn) (3 Replies)
Discussion started by: guhas
3 Replies
2. UNIX for Advanced & Expert Users
Hello,
I'm running one script every night and that's kick off through cron jobs.
Inside the script i'm checking whether my script is already running or not.
I'm using following command to check whether is running or not.
ps -eaf | grep "test_PID.ksh" | grep -v "grep test_PID.ksh"... (5 Replies)
Discussion started by: nirav_soni
5 Replies
3. UNIX for Dummies Questions & Answers
I need to kill all the processes of user "release" on system "PROterm" or the parent process for the user
I did this
ps -ef | grep PROterm | grep release
i got
release 2900014 2961494 0 12:19:44 pts/3 0:00 PROterm
release 3264694 2900014 0 12:19:44 - 0:00 PROterm
if i... (7 Replies)
Discussion started by: ajit.yadav83
7 Replies
4. UNIX for Dummies Questions & Answers
i want a command to display all the process running for partical user and in all process i want to see only particular process details.. pls suggest comand like ps -ef (1 Reply)
Discussion started by: Babu154
1 Replies
5. Shell Programming and Scripting
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
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. Emergency UNIX and Linux Support
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
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
I have two scripts lets say A.expect and B.sh needs to be executed.
I am executing B.sh from A.expect where B.sh has sleep command.
My problem is that when B.sh encounters the sleep command my A.expect starts executing and exits.
but my A.expect should execute only after completing B.sh.
Is... (3 Replies)
Discussion started by: priya@2012
3 Replies
10. Programming
Hi:
I have a program written in FORTRAN running on AIX platform.
It is because missing of documentation and without root password, therefore we want to modify the program so that we can find out which script/program that call this FORTRAN program.
I have google for few days, all of them are... (3 Replies)
Discussion started by: cstsang
3 Replies
LEARN ABOUT SUSE
git-revert
GIT-REVERT(1) Git Manual GIT-REVERT(1)
NAME
git-revert - Revert an existing commit
SYNOPSIS
git revert [--edit | --no-edit] [-n] [-m parent-number] [-s] <commit>
DESCRIPTION
Given one existing commit, revert the change the patch introduces, and record a new commit that records it. This requires your working tree
to be clean (no modifications from the HEAD commit).
Note: git revert is used to record a new commit to reverse the effect of an earlier commit (often a faulty one). If you want to throw away
all uncommitted changes in your working directory, you should see git-reset(1), particularly the --hard option. If you want to extract
specific files as they were in another commit, you should see git-checkout(1), specifically the git checkout <commit> -- <filename> syntax.
Take care with these alternatives as both will discard uncommitted changes in your working directory.
OPTIONS
<commit>
Commit to revert. For a more complete list of ways to spell commit names, see "SPECIFYING REVISIONS" section in git-rev-parse(1).
-e, --edit
With this option, git revert will let you edit the commit message prior to committing the revert. This is the default if you run the
command from a terminal.
-m parent-number, --mainline parent-number
Usually you cannot revert a merge because you do not know which side of the merge should be considered the mainline. This option
specifies the parent number (starting from 1) of the mainline and allows revert to reverse the change relative to the specified parent.
Reverting a merge commit declares that you will never want the tree changes brought in by the merge. As a result, later merges will
only bring in tree changes introduced by commits that are not ancestors of the previously reverted merge. This may or may not be what
you want.
See the revert-a-faulty-merge How-To[1] for more details.
--no-edit
With this option, git revert will not start the commit message editor.
-n, --no-commit
Usually the command automatically creates a commit with a commit log message stating which commit was reverted. This flag applies the
change necessary to revert the named commit to your working tree and the index, but does not make the commit. In addition, when this
option is used, your index does not have to match the HEAD commit. The revert is done against the beginning state of your index.
This is useful when reverting more than one commits' effect to your index in a row.
-s, --signoff
Add Signed-off-by line at the end of the commit message.
AUTHOR
Written by Junio C Hamano <gitster@pobox.com[2]>
DOCUMENTATION
Documentation by Junio C Hamano and the git-list <git@vger.kernel.org[3]>.
GIT
Part of the git(1) suite
NOTES
1. revert-a-faulty-merge How-To
file:///usr/share/doc/git-doc/howto/revert-a-faulty-merge.txt
2. gitster@pobox.com
mailto:gitster@pobox.com
3. git@vger.kernel.org
mailto:git@vger.kernel.org
Git 1.7.1 07/05/2010 GIT-REVERT(1)