So i have this program that is supposed to be a (super basic) server in Linux that shows me this menu:
What u want to do?
0 -> Exit
1 -> Add product
2 -> Show products list
3 -> Turn on server
And i want it so that when you put the number 3, the server.c stops, like when you press CTRL + Z and send the commnad "bg" so that the server runs in backgroundg (like when you do the command "./server&") so i can open the client.c and interact with the server.
Example of what i want it to do when you input 3 (on here i did it manually on the propmt):
estgv18708@viriato:~/tp6$ ./server
What u want to do?
0 -> Exit
1 -> Add product
2 -> Show products list
3 -> Turn on server
3
^Z
[1]+ Stopped ./server
estgv18708@viriato:~/tp6$ bg
[1]+ ./servidor &
Thanks in advance! :D