I am trying to reproduce a situation where a process fails due to a network outage. I was hoping to reproduce this signal with a kill command. A normal kill command is not working. I have taken a look at /usr/include/sys/signal.h to try to find a signal that refers to anything that might be related to a network outage, but with no luck. Has anybody tried to reproduce a network outage with the kill command?
Sorry if this is a newbish question! Please correct me if I am going about this in a completely wrong way.
None. A "network failure" is not a signal.
As others have said, signals dont work that way, they are not generally tied to specific error codes like "no network", I assume you are coming from a Windows background? If you want to reproduce a network failure, cause it by having the process try to access a non existent address or by disabling the network link temporarily on the test machine.