kill(child_pid, SIGSTOP);

From: pc_newbie (ay_at_computermail.net)
Date: 10/08/03


Date: Thu, 09 Oct 2003 00:59:16 +1000

hi all, i am having the following problem:

1. parent process run forever in a while loop
2. and accept user to type in command use execvp() to execute user command
3. if process receives SIGSTOP while child process running on
foreground, i use kill(cpid, SIGSTOP); to stop child process,
the problem is that how can i redirect parent to tty to accecpt new user
command? after SIGSTOP is sent to child process, it stops both child and
parent, until SIGCONT is sent. HOW can just stop child process and let
parent process to continue to accept new command?

another problem is that, if i execute command with & and it was put in
background, and i tried to kill(cpid, SIGTTOU) and kill(cpid, SIGCONT),
but i can't bring it back to foreground, do you know how to do that?
thanks:)



Relevant Pages

  • Re: Shared memory and error 997
    ... CreateProcess(...including szName in the command line ... >> CreateFileMappingin the parent process. ... >> command line parameter to the child process. ... >> shared memory using OpenFileMappingit fails and GetLastError() ...
    (microsoft.public.vc.language)
  • Re: Persistent connections
    ... do you get a persistent PHP ... the at command (from an SSH ... HUP to all child process. ... expired - the method described above just changes the parent process ...
    (comp.lang.php)
  • Re: unix shell script ignores exit when in function that is piped to tee
    ... > process is fed into the stdin of the parent process that's running the right ... > hand side of the command. ... If there is a child process it should have a different process-id, ... But I tried printing out the pid to a file from within the ...
    (comp.unix.shell)
  • Re: export does not work on makefiles
    ... In general, whenever you run a command, that command runs ... as a separate process with its own copy of the parent process' environment. ... That child process modified its environment and then ...
    (comp.unix.programmer)
  • Re: IPC
    ... >> This is a nasty command that attempts to fill up your disk with a file ... because the shell process will wait for the command process ... parent shell will NOT wait for the child process to complete. ... child process 22187 finished, closing pipe ...
    (comp.lang.perl.misc)