Technical details and the social contract mandate that your generator is never connected to the main power grid. The generator should be wired to an enclosed AC transfer switch. This switch will connect either the generator or the main grid to your home, but never both.
Some detail: If the generator is wired to the main grid it can prevent restoration of main grid power. While an AC transfer switch will perform the task, many jurisdictions mandate additional safety precautions (which can be quite expensive).
It could. But, there's more layers to this swiss cheese model of safety. For example, the lineman's procedure is to ground out, then isolate, then test. They'd need to skip both ground out and test to be electrocuted by an asshole with a generator.
Of course, but we should never be advocating for the elimination of Swiss cheese slices. Don’t use the suicide plug, get it wired up correctly with isolation.
The proper way of doing it is using what's called a generator bypass switch, basically it's a physical switch that runs before your fuse box, and it makes it impossible to have both the main and the generator being fed at the same time, so you can either have the main on or you could have the generator on. This prevents the electricity from your generator back feeding into the line and killing a line worker trying to restore power.
Sadly, like the other comments have said people tend to use these male to male cables in order to not have to pay the $2,000 to install the switch and instead choose to just turn the main breaker off and plug that cable in. But since it's possible to have both the main and the generator on it's not legal because if you forgot to throw the Main or if you did it incorrectly you could be putting workers at risk
Even disregarding the safety risk of using such a cable, not having a dedicated switch installed also means that you're plugging your generator into usually an outside socket of the house, and those power lines aren't usually meant to have a high load so you risk creating a fire from over straining the line as well
Well, if you put them right in the normal outlet you bypass breaker and built in fuses, if breaker is open. If it is closed, then it maybe should pop if whole net outside house consumes more current than your house is allowed to (so maybe immediately), but still provides no protection inside.
Or maybe if you have individual low-current rated breakers for every outlet, then yes, in this specific scenario it should technically work.
Still, you know, generally bad idea.