Hell Sir,
This is chanikya
Is there any System call which behaves just like fork but i dont want to return back two times to the calling func.
In the following ex iam creating a child process in the called func but the ex prints two times IN MAIN.
ex :-
Last edited by Yogesh Sawant; 04-16-2008 at 04:37 AM..
Reason: added code tags
Ther are two process in my program and i want both to constantly running. So i have written the following code. But one of this process which is calling function wsJobCheck() is getting terminated with giving message : Program exited normally.
Can any one suggest why this is happing.
Code :
... (1 Reply)
Hi Everybody,
I want to create a shell script named as say "jip" and it is runned.
And i want that when i do ps + grep for the process than this jip should be shown as process.
Infact there might be process with name jip which is already running. (3 Replies)
I'm very new to UNIX, so I need some help please.
How do I create a zombie process with just basic UNIX commands (no script, C, PERL, etc)? Please give an example. Thanks. (6 Replies)
Hi All,
I need to check for a process, if the process is running then I have to create an HTML file, say A.HTML.
If the process is not running then I have to rename the existing html, say A.HTML to B.HTML so that the process which looks for the file A.HTML does not find it?
How do I do... (1 Reply)
Hi
I have solaris 10 system. I try get backup of one mount point to LTO2 tape drive which is attached to another machine but backup aborted.(restoring files to another mount point at same time) . can anybody help me
DUMP: Mapping (Pass I)
DUMP: Mapping (Pass II)
DUMP: Writing 63... (1 Reply)
first off let me introduce myself. My name is Eric and I am new to linux, I am taking an advanced linux administration class and we are tasked with creating a script to add new users that anyone can run, has to check for the existence of a directory. if the directory does not exist then it has... (12 Replies)
hi
I am seeking to create a cgi-bin type creation that will allow users browsing the site to be able to run searches that would be a grep command or SED in the backround. I am not sure how to go about this, if you would give me a pointer or direction about what technology i could inform myself... (0 Replies)
I am working on a text file where I have to get data from a text file and convert it into either CSV format or Column format as shown below.
OUTPUT Expected
GRP Name Pair Size DName DNumber PName PNumber
adm_grp Pair1 150.00KG Pair_0ABC_1 0396 Pair_0267_s 1292
... (6 Replies)
Hi all ! :)
What I want?
1. All child process must be in the same group of process. Parent is a leader of the group.
How to do this? I would be greatfull of some example of code, I read about setsid but I can't even start...
My code so far:
#include <stdio.h>
#include <stdlib.h>... (2 Replies)
I have created one file that contains all the necessary info in it to create a download link. In each of the lines /results/analysis/output/Home/Auto_user_S5-00580-6-Medexome_67_032/plugin_out/FileExporter_out.67... (8 Replies)
Discussion started by: cmccabe
8 Replies
LEARN ABOUT NETBSD
cpu_lwp_fork
CPU_LWP_FORK(9) BSD Kernel Developer's Manual CPU_LWP_FORK(9)NAME
cpu_lwp_fork, child_return, proc_trampoline -- finish a fork operation
SYNOPSIS
#include <sys/proc.h>
void
cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize, void (*func)(void *), void *arg);
void
child_return(void *arg);
DESCRIPTION
cpu_lwp_fork() is the machine-dependent portion of fork1() which finishes a fork operation, with child lwp l2 nearly set up. It copies and
updates the PCB and trap frame from the parent l1, making the child ready to run.
cpu_lwp_fork() rigs the child's kernel stack so that it will start in proc_trampoline(). proc_trampoline() does not have a normal calling
sequence and is entered by cpu_switch(). If an alternate user-level stack is requested (with non-zero values in both the stack and stacksize
arguments), the user stack pointer is set up accordingly.
After being entered by cpu_switch() and while running in user context (within the kernel) proc_trampoline() will invoke the function func
with the argument arg. If a kernel thread is being created, the return path and argument are specified with func and arg. If a user process
is being created, fork1() will pass child_return() and l2 to cpu_lwp_fork() as func and arg respectively. This causes the newly-created
child process to go directly to user level with an apparent return value of 0 from fork(2), while the parent process returns normally.
SEE ALSO fork(2), cpu_switchto(9), fork1(9)BSD April 13, 2010 BSD