Topic awaiting preservation: C++ help (Page 1 of 1) |
|
---|---|
Neurotic (0) Inmate Newly admitted From: |
posted 11-12-2004 05:08
where would I post questions regarding some C++ code? |
Paranoid (IV) Inmate From: beyond the gray sky |
posted 11-12-2004 05:55
first and foremost, welcome to the asylum. A nurse will be by shortly to administer your pills and make sure your straight jacket is nice and snug. |
Nervous Wreck (II) Inmate From: mn |
posted 11-12-2004 08:11
I would guess the forum "Server-Side Scripting - Oh my! " would be the most apropriate, because it's the closest one I can see to c++ programming, and I believe cgi can be c++ programs. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 11-12-2004 12:25
yeah, that would do it. And I'll move it there now. You'll be able to use the moved notice to go there. |
Maniac (V) Inmate From: Lebanon |
posted 11-12-2004 14:59
Welcome Mister, |
Obsessive-Compulsive (I) Inmate From: |
posted 11-12-2004 17:59
Thanks for the welcome. |
Obsessive-Compulsive (I) Inmate From: |
posted 11-12-2004 19:33
After thinking about it a bit more, I think I can just fork() off a child process (the command to be sent to the background) and not wait for it to finish. I was thinking of maintaining a stack/array of processes sent to the background so that I can bring the most recent process sent to the background to the foreground via fg. |
Paranoid (IV) Inmate From: Madison, Indiana, USA |
posted 11-12-2004 20:13
Your idea to fork a child is going in the correct direction. After the fork, use one of the exec commands to execute the processes you want to run in the background. After the fork, both the parent and the child will continue to run more or less independently. On successful creation of the child, 'fork' will return the child's pid to the parent process and will return 0 to the child process. If not successful, the return value (to the parent only) is -1 and errno is set. |
Nervous Wreck (II) Inmate From: |
posted 11-13-2004 10:57
I am writing a basic shell for a class, but the professor and TA are intentionally vague so I am looking for other places to garner the needed knowledge to write the shell. |