0

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.

SSH This
  • 495
  • 1
  • 5
  • 8
  • 2
    [Windmills do not work that way!](https://en.wikipedia.org/wiki/Unix_signal) (in other words, "Yes, you're going about this in a completely wrong way" - look into alternate kinds of IPC, like dbus) – voretaq7 Jun 21 '13 at 16:26

2 Answers2

7

None. A "network failure" is not a signal.

voretaq7
  • 79,879
  • 17
  • 130
  • 214
2

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.