J
J Peterman
I need to do this exercise, but am having problems.
I need to write a program that firstly, sleeps for 5 seconds, then reads
a line of input from file descriptor 0 and then writes the line back to
file descriptor 1.
Apparrantly, this program would block forever unless you type a line of
text on the keyboard, but I can't get a working program to try.
Next, this program needs to be modified so that it would write its input
from file descriptor 0 to file descriptor 1 IF there is an input line
from the keyboard. Otherwise it should report no input and terminate.
Can anyone help me with this please? I've spent far too long on it
already, and it's holding me up from moving to the next exercise...
I need to write a program that firstly, sleeps for 5 seconds, then reads
a line of input from file descriptor 0 and then writes the line back to
file descriptor 1.
Apparrantly, this program would block forever unless you type a line of
text on the keyboard, but I can't get a working program to try.
Next, this program needs to be modified so that it would write its input
from file descriptor 0 to file descriptor 1 IF there is an input line
from the keyboard. Otherwise it should report no input and terminate.
Can anyone help me with this please? I've spent far too long on it
already, and it's holding me up from moving to the next exercise...