currently I am writing my master thesis and got a little problem in C++. Under certain conditions, I have to restart the ntp daemon, therefore I call:
system("service ntp restart");
But after this ntp is not listening on port 123, but rather 8377 and 8378. This port belong to an udp channel, which is used in the C++-prog.
Does anyone got an idea for this malicious behaviour ?
Thanks :)
The system() executes shell command and result of this shell command has nothing common with C++. You problem is definitely not with the C++ but with the shell script:
Please verify the results of that command and check the command envrionment since there is a big chance that you need to set environment variables. But all this - shell issues, not C++ ones.