Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Run Processes Sequentially Using Process ID (PID) Post 302357143 by matrixmadhan on Monday 28th of September 2009 10:57:38 PM
Old 09-28-2009
Please make use of code tags
Code:
 code tags

List them one after another in a wrapper and it's done. Is that what you are looking for.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Controlling processes knowing the PID's

Dear all, suppose that I start a process (named "father"). "father" starts in turns a process called "child" with an execv call (after a fork). In this way "father" will be notified if "chlid" crashes (SIGCHILD mechanism). The problem is: if "father" crashes, how can I do to be recreate a... (1 Reply)
Discussion started by: npalmentieri
1 Replies

2. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

3. Shell Programming and Scripting

sequentially run the shell scripts.

Hi All, I have a master script , which would run 4 scripts in sequence. When the first script gets executed , I need to check if a particular process has been completed. If it is completed , only then proceed with the second script. This same rule applies to script3 and script4. Can someone... (4 Replies)
Discussion started by: nua7
4 Replies

4. Shell Programming and Scripting

find pid of process run in specific location

Hello, I have a process a.out that runs from /a and /b How can I get the pid of the one running from /a ps -C /a/a.out does not work Thanks! (4 Replies)
Discussion started by: JCR
4 Replies

5. Shell Programming and Scripting

Run a process but on a certain pid

Hi all, I am having a little bit of trouble trying to find something out. I am trying to script a start/stop php file, for some gaming servers i host. The server have 2 lots of processes running on them, and the customers need to be able to start and stop them at their will. So i know how to... (1 Reply)
Discussion started by: Syth
1 Replies

6. Shell Programming and Scripting

Any scenario where a script will not run sequentially when called?

Can a script that calls another script exit and end while the called script is still running? If so, how can this be made to happen? (1 Reply)
Discussion started by: Harleyrci
1 Replies

7. Shell Programming and Scripting

Run multiple python programs sequentially.

I HAVE WRITTEN NINE PYTHON CODES TO PERFORM A TASK ........ I WISH TO RUN THEM SEQUENTIALLY. eg. code1__code2 >>>>>>>>code9.py TO GET DESIRED OUTPUT. PLS HELP ME WRITTING SHELL SCRIPT .. I HAVE TO DISTRIBUTE THESE CODE FOR BEING USED BY OTHERS. (2 Replies)
Discussion started by: upvan111
2 Replies

8. Shell Programming and Scripting

Unix Script -- Suggestions to list and kill PID's sequentially

Hi, I'm trying to write a script where i'm trying to grep the PID and the associated file and list them. Then execute the KILL command sequentially on the listed PID's for ".tra" files ==================================================== ps -aux | grep mine adm 27739 0.2 0.8 1131588... (12 Replies)
Discussion started by: murali1687
12 Replies

9. Shell Programming and Scripting

Help with how to run multiple script with concurrent processes runs sequentially.

Hi, The problem detail is follows I have three individual scripts . SCRIPT A sh -x sqoop_channels_nc_daily_01.sh & sh -x sqoop_channels_nc_daily_02.sh & sh -x sqoop_channels_nc_daily_03.sh SCRIPT B sh -x sqoop_contacts_nc_daily_01.sh & sh -x sqoop_contacts_nc_daily_02.sh & sh -x... (1 Reply)
Discussion started by: H_bansal
1 Replies

10. Shell Programming and Scripting

How to run scripts sequentially in background?

Hi , I have prepared the following shell script to run the hqls in background. These scripts are running Parallel but I want to run the hqls sequentially in background. cat >cc_script.ksh nohup hive -hiveconf rrdt=2016-06-12 -f /home/files/cust1.hql > home/log/cust1.log 2>&1 & nohup hive... (6 Replies)
Discussion started by: ROCK_PLSQL
6 Replies
getpid(2)							System Calls Manual							 getpid(2)

NAME
getpid(), getpgid(), getpgrp(), getpgrp2(), getppid() - get process, process group and parent process ID. SYNOPSIS
DESCRIPTION
These functions return process, process group and parent process IDs, as follows: Process group ID of the specified process. If pid is zero, the call applies to the calling process. Same result as Process group ID of the calling process. Process group ID of the specified process. If pid is zero, the call applies to the calling process. Same result as Process ID of the calling process. Parent process ID of the calling process. If the parent process is the initialization process (known as the call returns 1. Security Restrictions The system call is subject to compartmental restrictions. See compartments(5) for more information about compartmentalization on systems that support that feature. Compartmental restrictions can be overridden if the process possesses the privilege (PRIV_COMMALLOWED). Processes owned by the superuser may not have this privilege. Processes owned by any user may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
The functions return the following values: Successful completion. n is a nonnegative process ID, as described above. Failure: and only. is set to indicate the error. ERRORS
If or fails, is set to one of the following values: [EPERM] The current process and pid are not in the same session (see setsid(2)). [ESRCH] No process can be found corresponding to that specified by pid. AUTHOR
and were developed by HP, AT&T, and the University of California, Berkeley. SEE ALSO
exec(2), fork(2), setpgid(2), setsid(2), signal(5). STANDARDS CONFORMANCE
getpid(2)
All times are GMT -4. The time now is 11:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy