Sponsored Content
Top Forums Shell Programming and Scripting System should not kill the child process when parent id is 1 Post 302990463 by RudiC on Thursday 26th of January 2017 02:05:24 PM
Old 01-26-2017
Welcome to the forum!

With that little context it is difficult to give really valuable advice accounting for all sort of possible caveats. Modifying / improving ONLY your given pipe to include your request, try:
Code:
ps -ef | awk '/[p]rocesses/ && $3 != 1 {print $2}'

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

kill parent and child

Hello all, I have gone through the search and looked at posting about idle users and killing processes. Here is my question I would like to kill an idle user ( which I can do) but how can I asure that all of his process is also killed whit out tracing his inital start PID. I have tried this on a... (4 Replies)
Discussion started by: larry
4 Replies

2. Programming

parent and child process question?

Hi everybody, I'm trying to understand how a parent and child processes interact. This function( below) basically measures the fork time from the perspective of the parent only. what i would like to know is how to measure the time from the perspective of parent and child (ie: inserting... (0 Replies)
Discussion started by: tosa
0 Replies

3. Programming

Implementing 2 pipes between a parent and child process

Hi all, I'm trying to write a program that has some data it wants to send through a filter program(in this case tr), and then recieve the output from that filter program. The way I'm trying to do it is by setting up two pipes between the programs and piping the data in through one pipe and back... (2 Replies)
Discussion started by: bwgoudey
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. UNIX for Dummies Questions & Answers

Command to find parent and child process?

Hi, I have a script that calls other scripts/commands which may or may not spawn other process. From my understanding, when I do a ps -ef, the highest numbered process ID is supposed to be the parent ID of all the other related child processes, is this correct? In most or all... (3 Replies)
Discussion started by: newbie_01
3 Replies

7. Programming

Parent process starts before the child using signal, in C

Hi, i want that the parent process start before the child, this code doesn't work, if the child start before the parent it wait for signal, then the father send the signal SIGALRM and the child catch it and call printf; else the father call printf and send the signal to the child that call its... (1 Reply)
Discussion started by: blob84
1 Replies

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

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

10. Shell Programming and Scripting

Kill Parent/ Child processes

I am trying to kill PIDs that are tied to a KSH "load_sqlplus" and I am using the below code LIST_PID=`ps -ef | grep -i "load_sqlplus" | grep -v grep | awk '{print $2}'` if ; then echo "Processes killed" "PID : " $LIST_PID kill -9 $LIST_PID else echo "Nothing to Kill" fi... (4 Replies)
Discussion started by: venky338
4 Replies
Gtk2::Box(3pm)						User Contributed Perl Documentation					    Gtk2::Box(3pm)

NAME
Gtk2::Box - wrapper for GtkBox HIERARCHY
Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget +----Gtk2::Container +----Gtk2::Box INTERFACES
Glib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable Gtk2::Orientable METHODS
$box->set_child_packing ($child, $expand, $fill, $padding, $pack_type) o $child (Gtk2::Widget) o $expand (boolean) o $fill (boolean) o $padding (integer) o $pack_type (Gtk2::PackType) boolean = $box->get_homogeneous $box->set_homogeneous ($homogeneous) o $homogeneous (boolean) $box->pack_end ($child, $expand, $fill, $padding) o $child (Gtk2::Widget) o $expand (boolean) o $fill (boolean) o $padding (integer) $box->pack_end_defaults ($widget) o $widget (Gtk2::Widget) $box->pack_start ($child, $expand, $fill, $padding) o $child (Gtk2::Widget) o $expand (boolean) o $fill (boolean) o $padding (integer) $box->pack_start_defaults ($widget) o $widget (Gtk2::Widget) list = $box->query_child_packing ($child) o $child (Gtk2::Widget) $box->reorder_child ($child, $position) o $child (Gtk2::Widget) o $position (integer) integer = $box->get_spacing $box->set_spacing ($spacing) o $spacing (integer) PROPERTIES
'homogeneous' (boolean : default false : readable / writable / private) Whether the children should all be the same size 'spacing' (integer : default 0 : readable / writable / private) The amount of space between children CHILD PROPERTIES
'expand' (boolean : default true : readable / writable / private) Whether the child should receive extra space when the parent grows 'fill' (boolean : default true : readable / writable / private) Whether extra space given to the child should be allocated to the child or used as padding 'pack-type' (Gtk2::PackType : default "start" : readable / writable / private) A GtkPackType indicating whether the child is packed with reference to the start or end of the parent 'padding' (Glib::UInt : default 0 : readable / writable / private) Extra space to put between the child and its neighbors, in pixels 'position' (integer : default 0 : readable / writable / private) The index of the child in the parent ENUMS AND FLAGS
enum Gtk2::PackType o 'start' / 'GTK_PACK_START' o 'end' / 'GTK_PACK_END' SEE ALSO
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.14.2 2012-05-27 Gtk2::Box(3pm)
All times are GMT -4. The time now is 11:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy