10 More Discussions You Might Find Interesting
1. 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
2. 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
3. Shell Programming and Scripting
!/bin/sh
pid=$(ps -Aj | grep MSTRSvr | grep -v grep | awk '{print $1}')
sid=$(ps -Aj | grep MSTRSvr | grep -v grep | awk '{print $3}')
ps -s "$sid"
I am not able to get the desired output it says process list error
if i use watch ps -s "$sid" it considers only the first session id (5 Replies)
Discussion started by: schippada
5 Replies
4. 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
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
I have a bash script that has been used for months here at work for doing an SSH into other machines both Linux and Solaris and running a script on the remote machine. Recently I have started to noticed that things are being left being on the maching doing the SSH.
For example....
tivoli ... (1 Reply)
Discussion started by: LRoberts
1 Replies
7. UNIX for Advanced & Expert Users
hi,
I want my program to fork a new process and then I want to kill the parent process. The parent program before dying will issue a SIGTERM to all its childs. Which eventually kills all Children.
I cant handle the SIGTERM at the child level.:(
What I was thinking of was the Parent... (3 Replies)
Discussion started by: tyler_durden
3 Replies
8. UNIX for Dummies Questions & Answers
Hey, first time poster and a new UNIX user here.
My question is regarding the forking process. I logged in to tty1, and typed the command ls -1 and hit enter. How can i tell that the ls -1 command ran in a subshell?
Thanks. (0 Replies)
Discussion started by: Vitamin254
0 Replies
9. Programming
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
pid_t pID;
int i;
for (i = 0; i < 3; i++)
{
pID = fork ();
if (pID == 0)
{
printf ("Value of i --> %d... (2 Replies)
Discussion started by: kymthasneem
2 Replies
10. Programming
Hi
I'm currently working with C on UNIX (HPUX) and need to be able to fork a seperate Java process from within a running C process.
I can run the following code from the command line via a script but am having difficulty getting it to work from within the code.
I am trying to use execl. Is... (4 Replies)
Discussion started by: themezzaman
4 Replies
rad_fork(3) Library Functions Manual rad_fork(3)
NAME
rad_fork - Creates a new process on a Resource Affinity Domain (libnuma library)
SYNOPSIS
#include <numa.h>
pid_t rad_fork(
radid_t radid,
ulong_t flags );
PARAMETERS
Identifies a Resource Affinity Domain (RAD) on which to allocate data and schedule threads for a new process. Specifies options (a bit
mask) that affect the attachment or binding operation. See DESCRIPTION for details.
DESCRIPTION
The rad_fork() function behaves the same as nfork() when the latter specifies a resource type of R_RAD and a resource descriptor that
points to a RAD set containing a single RAD identifier. For a description of this behavior, refer to the description of the R_RAD resource
type in nfork(3).
The following option is specified for the flags argument: This option specifies that any processes later forked by the specified process
will not inherit the parent's RAD assignment.
By default, any child processes will be assigned to the same home RAD as their parent process, and will be attached or bound to that
RAD if the parent was attached or bound.
RETURN VALUES
Success (returned to the child process). In this case, the function also returns the process ID of the child process to the parent process.
The child process and all of its data structures are allocated on the RAD specified by the radid argument. In addition, the initial
thread of the child process is sceduled on one of the CPUs in the specified RAD. Failure (returned to the parent process). In this
case, no child process is created and the function sets errno to indicate the error.
ERRORS
The limit on the total number of processes executing for a single user would be exceeded. This limit can be exceeded by a process with
superuser privilege. The radid argument specifies an invalid RAD identifier. There is insufficient memory to create this process.
SEE ALSO
Functions: nfork(3), nloc(3), numa_intro(3), radsetops(3)
Files: numa_types(4)
rad_fork(3)