Simple shell running with exec family


 
Thread Tools Search this Thread
Top Forums Programming Simple shell running with exec family
# 1  
Old 04-04-2019
# Erroneous question, so can be removed.

# Erroneous question, so can be removed.

Last edited by beginnerboy; 04-05-2019 at 06:17 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Working of exec family of functions

Hi, I am studying exec family of functions.Its man page says,it replaces the current process image with a new process image. If it replaces the binary,then after returning back,how does it get the previous parameters of the process which called exec?As replacing process image means replacing... (5 Replies)
Discussion started by: Radha.Krishna
5 Replies

2. Programming

Working of exec family of functions

Hi, I am studying exec family of functions.Its man page says,it replaces the current process image with a new process image. If it replaces the binary,then after returning back,how does it get the previous parameters of the process which called exec?As replacing process image means replacing all... (1 Reply)
Discussion started by: Radha.Krishna
1 Replies

3. Shell Programming and Scripting

Script Variables Inquiry, Values Okay in Standalone Exec, No-Show in Cron Exec

I have the following bash script lines in a file named test.sh. #!/bin/bash # # Write Date to cron.log # echo "Begin SSI Load $(date +%d%b%y_%T)" # # Get the latest rates file for processing. # d=$(ls -tr /rms/data/ssi | grep -v "processed" | tail -n 1) filename=$d export filename... (3 Replies)
Discussion started by: ginowms
3 Replies

4. Shell Programming and Scripting

Simple Script to Check running Process

#!/bin/sh CHECK='ps aux | grep start.jar | grep -v grep | wc -l' if then /usr/local/jre-1.7.0/bin/java - jar start.jar & else fi Could anybody advise whats up with this code im trying to put this in as a cron job to check that solr search engine is running every 10secs and if... (10 Replies)
Discussion started by: will_123
10 Replies

5. Programming

help me understand exec() family of calls...

how does exec() do it? on successful call of exec() family of functions, they never return... how to i emulate that. assume the standard example, execl("/bin/ls","ls",NULL); now this would never return. i m trying to emulate exec()'s never to return feature... #include<unistd.h>... (4 Replies)
Discussion started by: c_d
4 Replies

6. Shell Programming and Scripting

how to use exec command in C shell

i have a script where i am reading some lines from a file into another file.. script works fine in bash.. #!/usr/bin/csh awk 'NR>20&&NR<32' try.sum | awk '{print $4 }' >io awk 'NR>20&&NR<32' try.sum | awk '{print $9 }' >io1 awk 'NR>20&&NR<32' try.sum | awk '{print $14 }'>io2 exec 10<io... (1 Reply)
Discussion started by: npatwardhan
1 Replies

7. OS X (Apple)

Address family not supported by protocol family

Hi, I compiled with no error a C program, than I tryed to execute it and than I get this error: connessione al server fallita: Address family not supported by protocol family What does it mean? Why I get this error only on Mac os x while on Ubuntu the program works? The code is:... (3 Replies)
Discussion started by: DNAx86
3 Replies

8. Shell Programming and Scripting

Need Help Running a simple script

The following works: $ zgrep "TIME *0 *3 *10 " /opt/oss/report.gz | sed -e "s/ */ /g" 24659 TIME 0 3 10 OWNER 0 8 1 I need to queary over 1000 records, so I try: for b in $(cat /home/user/file | awk '{print $3,"*"$4,"*"$5,"*"$6" "}' | sed 's/^/"/' | sed 's/$/"/') do zgrep $b... (2 Replies)
Discussion started by: tony3101
2 Replies

9. UNIX for Dummies Questions & Answers

need to restrict program exec and running

I'm on Freebsd 4.5 stable, havin question of that kind: I need to restrict programs running, like BitchX for example, which can be dowlnoaded by logged on user, and i cant set permissions to all users to prevent that program from executing. And ipfw doesnt help me because of i need to allow that... (1 Reply)
Discussion started by: hachik
1 Replies
Login or Register to Ask a Question
wait(1) 						      General Commands Manual							   wait(1)

NAME
wait - await process completion SYNOPSIS
[pid] DESCRIPTION
If no argument is specified, waits until all processes (started with of the current shell have completed, and reports on abnormal termina- tions. If a numeric argument pid is given and is the process ID of a background process, waits until that process has completed. Other- wise, if pid is not a background process, exits without waiting for any processes to complete. Because the system call must be executed in the parent process, the shell itself executes without creating a new process (see wait(2)). Command-Line Arguments supports the following command line arguments: The unsigned decimal integer process ID of a command, whose termination is to wait for. WARNINGS
Some processes in a 2-or-more-stage pipeline may not be children of the shell, and thus cannot be waited for. SEE ALSO
csh(1), ksh(1), sh-posix(1), sh(1), wait(2). STANDARDS CONFORMANCE
wait(1)