10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys i have a problem with a script... this script creates differents GUI with YAD... well i want that when i press the "Cancel" button on this graphical interface all the child process and even the same script should be killed
#!/bin/bash
function gui_start {
local choice=""
... (4 Replies)
Discussion started by: maaaaarco
4 Replies
2. Shell Programming and Scripting
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
3. 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
4. UNIX for Dummies Questions & Answers
Consider this simple command line
bash -c 'echo $$ ; sleep 10000'This will print the newly created bash PID and sleep for a long time.
If I go to another terminal and do something like
ps -flax | grep leepI'll see something like
501 92418 91910 0 0:00.00 ttys000 0:00.00 bash -c echo $$... (5 Replies)
Discussion started by: teras
5 Replies
5. Programming
Im sure it has something to do with the wait() call, but everything ive tried either leaves me with a zombie or with the exec executing indefinitely.
switch(pid = fork())
{
case -1:perror("fork failed");
exit(1);
case 0:
if(key == "cd")
{
execl("/bin/cd", "cd",... (2 Replies)
Discussion started by: p00ndawg
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am using ksh to write my shell script. I need to create multiple-level of nested sub shells in my script. Lets say I have at n th subshell. My question is how do I come out from there to main login shell.
If I use 'exit' command then it is exiting from just one subshell and back to... (4 Replies)
Discussion started by: indra_saha
4 Replies
7. UNIX for Advanced & Expert Users
hi
OS: Sun Solaris
I have a scenario that when someone presses ctrl-c while executing a shell script, it should not just exit. it should kill all the child processes started by the running shell script only.
I am executing many other scripts parallely which in turn fork off more... (2 Replies)
Discussion started by: rakeshou
2 Replies
8. Shell Programming and Scripting
Hello,
How many child processes are actually created when running this code ?
#include <signal.h>
#include <stdio.h>
int main () {
int i ;
setpgrp () ;
for (i = 0; i < 10; i++) {
if (fork () == 0) {
if ( i & 1 ) setpgrp () ;
printf ("Child id: %2d, group: %2d\n",... (1 Reply)
Discussion started by: green_dot
1 Replies
9. Programming
Hello,
How many child processes are actually created when running this code ?
#include <signal.h>
#include <stdio.h>
int main () {
int i ;
setpgrp () ;
for (i = 0; i < 10; i++) {
if (fork () == 0) {
if ( i & 1 ) setpgrp () ;
printf ("Child id: %2d, group: %2d\n", getpid(),... (0 Replies)
Discussion started by: green_dot
0 Replies
10. UNIX for Dummies Questions & Answers
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