04-08-2010
Quote:
Originally Posted by
mrploddy
This returns to PHP the process ID of the wget process. However what I'm looking for is to get the process ID of the apache process that wget starts and runs. However the apache process that is doing the work doesn't appear to be any relation to the wget process (eg the apache process isn't a child process of wget).
They are connected by nothing but a network socket and have nothing in common otherwise. Think about it -- plug a different URL into wget and the process you spawn could be a thousand miles away!
If you want to spawn a local process, spawn a local process -- run the script yourself instead of wget-ing a URL that causes the web server to do it. Otherwise the process's PID and so forth is soley the web server's concern.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear Unix Gurus,
Here is my query.
If i start a script,it inturn calls many other scripts ..and most of them continue to run in parallel.
Suppose,if i want to stop my script for some reason,i need to kill -9 each of the processes running.It becomes clumsy if the sub processes r more.
... (15 Replies)
Discussion started by: gvsreddy_539
15 Replies
2. Shell Programming and Scripting
well, i have only been learning about linux, unix and shells for a few days.
For my online game to work, i need run a file each 10 seconds. Running that file will update mysql data, causing my online game to "tick". This adds resources and fights battles in game.
I know that i need to use a... (3 Replies)
Discussion started by: mikey1090
3 Replies
3. Shell Programming and Scripting
I run an online game, and every 10 seconds or so i need to "run" a file. In other words in needs to be executed. Its a PHP file.
The file updates vital things in my game, each time it does it its know as a "tick".
Here is the code i am using.
(wget... (2 Replies)
Discussion started by: mikey1090
2 Replies
4. Shell Programming and Scripting
Hi
Any idea how to get the process id of the process using the ports
lsof -i :portnumber does not work in my machine. I am on sun Solaris SPARC.
Any suggestion is highly appreciated (1 Reply)
Discussion started by: kinny
1 Replies
5. UNIX for Advanced & Expert Users
hi all,
I am trying to find the process id of the subsequent process created via fork and exec calls in perl.
For eg:
envVarSetter dataCruncher.exe < input.txt > output.txt
When I fork and exec the above command,
it returns only the pid of envVarSetter and I don't know how to find the... (9 Replies)
Discussion started by: matrixmadhan
9 Replies
6. Shell Programming and Scripting
Hi,
I'm trying to spawn a telnet process and trying to do some actions in the remote host using expect script. I would like to know how to suppress all the output in order the user using the script should not be able to see any actions done on the remote host. I tried using the "log_user 0"... (8 Replies)
Discussion started by: arun_maffy
8 Replies
7. Shell Programming and Scripting
I have posted this on the Web subforum but it seems that nobody knows to do this, maybe someone has a solution here. Thank you
I have a PHP application that starts a couple of processes on the server...the problem is that if I restart apache those running apps will die.
How can I start them... (1 Reply)
Discussion started by: valiadi
1 Replies
8. Shell Programming and Scripting
So this one just plain confuses me. I have a bunch of somewhat CPU intensive processes that all communicate using a shared memory region. Some of these programs are threaded and some also change the scheduling to FIFO or round robin. The good news is that everything works as long as I spawn... (3 Replies)
Discussion started by: talkingfennel
3 Replies
9. Shell Programming and Scripting
Hello,
The scenario is as follows, I have a background process running initially for which i know the PID on machine1. I use ssh from machine 2 to execute a script in machine 1. For some reason the back ground process is terminated. I would like to know which process caused the... (6 Replies)
Discussion started by: prasbala
6 Replies
10. Red Hat
Have no idea on what the below error message is:
Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -buildfile build.xml dist.
Any help? (3 Replies)
Discussion started by: gull05
3 Replies