The black widow spider practices sexual cannibalism, in which the female eats the male after mating - indeed, that's why they're called black widows in the first place. But males have an unexpected way of avoiding that fate.
The secret of male survival is to know just how hungry their potential mate is. That may seem ludicrously simple, but hunger really is a prime motivator behind why the females end up resorting to cannibalism - it's not actually down to anything much more complicated than that. And Arizona State researchers have been able to pinpoint a way that males can detect female hunger by smelling the silk of the females' webs.
The researchers first force-fed some females an unusually large diet of crickets, whereas another group of females received only just enough food to keep them alive. After four weeks, the latter group was obviously far hungrier and thus more likely to eat a male after mating, but the researchers weren't done.
In an attempt to fool the male spiders and to neutralize any potential variables, they first placed the males on a piece of clean, neutral silk made from a combination of the hungry and well-fed spiders' webs, and then they switched the females so that the hungry ones were on well-fed webs and vice versa.
Overwhelmingly, the male spiders picked up on which webs were made by hungry spiders and which ones were not, and then adjusted their complex mating dance accordingly. On the webs that were made by well-fed spiders, they were far more vigorous in the mating dance than they were otherwise, even though they unwittingly were in the presence of starved spiders.
All of this makes sense, considering black widows smell through their feet - and those are apparently some pretty powerful nose legs (leg noses?) that the spiders have got, since they can tell how much a female has eaten just from her web. And, as long as human researchers aren't messing with them, it appears the males are very good at using that knowledge to avoiding a grisly end to their spidery sex life.