for example in bash:
Code:
(
while [ 1 ]
do
echo hello-world
sleep 1
done) &
cd p2501
will go to the project-2501 directory while echo-ing hello-world in the background.
how does one do something similar in c ?
Code:
while(1)
{
printf("hello-world\n");
usleep(1000000);
} // background ?
chdir("p2501");
i figure some mixture of fork but i dont want it to overwrite the current process in memory.
am i not understanding how fork works ?
thank you,