Elisei
January 23rd, 2008, 07:23 AM
hi everybody:
i am a bit stuck writing a small C program. basically i fork of a process
to execute a user submitted command that is executed by execvp().
but if the command that is submitted runs forever, like "ping localhost" there is no way to stop it without stopping the actual program that calls execvp().
i am trying to figure out how to call kil(pid, SIGUSR1); so the prog recognises that it came from stdin while something like "ping localhost" is running & outputting to the screen.
it is confusing but i can post the code ...
i am a bit stuck writing a small C program. basically i fork of a process
to execute a user submitted command that is executed by execvp().
but if the command that is submitted runs forever, like "ping localhost" there is no way to stop it without stopping the actual program that calls execvp().
i am trying to figure out how to call kil(pid, SIGUSR1); so the prog recognises that it came from stdin while something like "ping localhost" is running & outputting to the screen.
it is confusing but i can post the code ...