Sponsored Content
Top Forums Programming Child process is not getting started Post 302089156 by Crab on Sunday 17th of September 2006 09:15:22 PM
Old 09-17-2006
thanx alot...

by using printf("--in child\n") instead of printf("--in child") , i got the desired output
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Process started on console

Please can someone describe what causes undesired process startup on system console. ps -ef output is like: root 1763 1 0 16:22:24 console 0:00 /bin/sh /usr/System........ process is blocking system console for any access (2 Replies)
Discussion started by: zverzak
2 Replies

2. UNIX for Advanced & Expert Users

how to know that a perticular process is started!!!

Hi all, I wanted a write a script which will start executing whenever a particular process will starts running in a background. Is there is any way in Unix if a directory contents changed then a signal/Interrupt will generated and by taking status of that interrupt I can execute some scripts.... (11 Replies)
Discussion started by: zing_foru
11 Replies

3. Shell Programming and Scripting

Process id of the exe started with nohup

Hi, I have a strange problem. In my shell script, i am startting another program (a c++ exe) with nohup . I am getting the process id of this started process with using $! I am writing this process id into another file so that i can keep checking for this process ids to check whether the... (2 Replies)
Discussion started by: parvathi_rd
2 Replies

4. 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

5. 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

6. Red Hat

Killing child daemon started by parent process

Hi All, Hope this is right area to ask this question. I have a shell script (bash) "wrapper.sh", which contains few simple shell command which executes a "server.sh" (conatins code to execute a java server) as a daemon. Now what I want to kill this "server.sh" so that the server should... (2 Replies)
Discussion started by: jw_amp
2 Replies

7. 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

8. 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

9. Shell Programming and Scripting

how to check whether a process started at particular time

I want to check whether a particular process has started at 10:00a.m or not. I can check process by ps -fu but dont know how to check it with respect to time. Could anyone help me with this? ---------- Post updated at 11:14 AM ---------- Previous update was at 10:52 AM ---------- can i use... (9 Replies)
Discussion started by: kishore kumar
9 Replies

10. Shell Programming and Scripting

I need to save a pid of a child started with $: su <user> -c “nohup …”

Hello, I want to save pid of a child process but I get empty file. su myuser -c "nohup ./mydaemon.sh >/dev/null 2>&1 & print $! > mydaemon.pid" This one works: nohup ./mydaemon.sh >/dev/null 2>&1 & print $! > mydaemon.pid Please help. Thank you in advance. (2 Replies)
Discussion started by: vincegata
2 Replies
memalloc_attr(3)					     Library Functions Manual						  memalloc_attr(3)

NAME
memalloc_attr - Query the memory allocation policy and attributes (libnuma library) SYNOPSIS
#include <numa.h> int memalloc_attr( vm_offset_t va, memalloc_attr_t *attr ); PARAMETERS
The user virtual address for which the memory allocation policy is requested. Points to a buffer to receive the memory allocation policy and attributes for the page containing the specified virtual address. DESCRIPTION
The memalloc_attr() function returns the current memory allocation policy and associated attributes in the buffer pointed to by attr for the address specified by va. If radset information about the memory allocation policy is desired, a radset must be allocated through the radsetcreate() function, and the mattr_radset element of the attr argument must point to that radset. Otherwise, a 0 must be specified for the mattr_radset. EXAMPLE
#include <numa.h> main() { vm_offset_t va; memalloc_attr_t attr; int id; int flags = SET_CURSOR_CONSUME; rad_cursor_t cursor = SET_CURSOR_INIT; radsetcreate(&attr.mattr_radset); va = (vm_offset_t)&attr; /* no policy in effect - return zeroes */ if (memalloc_attr(va, &attr) == -1) { perror("memalloc_attr"); radsetdestroy(&attr.mattr_radset); return 0; } printf("mattr_policy = 0x%lx ", attr.mattr_policy); printf("mattr_rad = 0x%lx ", attr.mattr_rad); printf("mattr_stride = 0x%lx ", attr.mattr_stride); printf("mattr_distance = 0x%lx ", attr.mattr_distance); printf("mattr_pagesz = 0x%lx ", attr.mattr_pagesz); /* set policy */ attr.mattr_policy = MPOL_DIRECTED; attr.mattr_rad = 0; if (nmadvise((void *)va, sizeof(memalloc_attr_t), 0, &attr) == -1) { perror("nmadvise"); radsetdestroy(&attr.mattr_radset); return 0; } if (memalloc_attr(va, &attr) == -1) { perror("memalloc_attr"); radsetdestroy(&attr.mattr_radset); return 0; } printf("mattr_policy = 0x%lx ", attr.mattr_policy); printf("mattr_rad = 0x%lx ", attr.mattr_rad); printf("mattr_stride = 0x%lx ", attr.mattr_stride); printf("mattr_distance = 0x%lx ", attr.mattr_distance); printf("mattr_pagesz = 0x%lx ", attr.mattr_pagesz); /* enumerate the mattr_radset */ printf(" Enumerating radset members: "); while ((id = rad_foreach(attr.mattr_radset, flags, &cursor)) != RAD_NONE) { if ((id % 8) == 0) printf(" "); printf("%3d, ", id); } printf(" "); } RETURN VALUES
Success. In this case, the function stores the requested memory allocation policy and attributes in the buffer pointed to by attr. If no memory allocation policy has been set for the specified virtual address (e.g., madvise() or nmadvise()) not called for that address), a zeroed attr structure is returned. Failure. In this case, the function sets errno to indicate the error. ERRORS
If the memalloc_attr() function fails, it sets errno to one of the following values: The address pointed to by va, attr, or mattr_radset is invalid. The mattr_radset element of the attr argument points to an invalid RAD set, possibly one that has not been created by a rad- setcreate() call. SEE ALSO
Functions: numa_intro(3) Files: numa_types(4) memalloc_attr(3)
All times are GMT -4. The time now is 07:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy