and what is
int d
for?
Type: Posts; User: Victor_November
and what is
int d
for?
try this, it is a little bit shorter
if( (choice <= 0) || (choice > 5) )
Here is some updated code:
It works but I still get a Signal Suspended message at a random (or so it appears) place in the output.
#include <stdio.h>
#include <signal.h>
#include...
Thanks for looking at it for me. As a part of the assignment I can't use sleep. But I will keep plugging away at it.
Hopefully this is more readable. I moved the getpid() above the fork.
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
void mySignalHandler(int sig);
void...
I can assure you that this is not the case.
I am not claiming success. Perhaps I did not make myself clear enough the first time: I am really new at this stuff. MK27 I am not trying to...
I am trying to fork a process then using two for loops have them alternate by printing a sequences of iterations
I added in this statement to the parent
x = waitpid(childPid, NULL,...
I took out if logic and the wait statement from the child. I also added the flush functions after the printf's. The output still looks the same.
Did the use of the signals seem correct? They...
Hi,
First off I am doing homework. I have been looking at this site to view code examples, and I am happy to see the technical caliber on these forums. This is the first time I am programming...