I use
sethostname()
to write my custom hostname on embedded device and works because I don't get back any error and if I read the new hostname with
gethostname()
the name is cotrrect, but after hw reboot my hostname go back to old value .
Why? And how can make permament the new value without update any configuration file (e.g. /etc/hostname )?
Thanks