Undo slaves state change on failed rdbSaveToSlavesSockets().
Undo slaves state change on failed rdbSaveToSlavesSockets().

As Oran Agra suggested, in startBgsaveForReplication() when the BGSAVE
attempt returns an error, we scan the list of slaves in order to remove
them since there is no way to serve them currently.

However we check for the replication state BGSAVE_START, which was
modified by rdbSaveToSlaveSockets() before forking(). So when fork fails
the state of slaves remain BGSAVE_END and no cleanup is performed.

This commit fixes the problem by making rdbSaveToSlavesSockets() able to
undo the state change on fork failure.

zhcy/redis,francischan714/redis,clamoriniere1A/redis,sunheehnus/redis,oranagra/redis,linfangrong/redis,YongMan/redis,badboy/redis,mverrilli/redis,janekmi/redis,AALEKH/redis,ituncle/redis,shreesundara/redis,4396/redis,aim-for-better/redis,seandsky/redis,kensou97/redis,pedigree/redis,pedigree/redis,itamarhaber/redis,a-pavlov/redis,mcanthony/redis,dreamquster/redis,seandsky/redis,twskipper/redis,OmarQunsul/graph-redis,soloestoy/redis,xujunhai1991/redis,charsyam/redis,yossigo/redis,antirez/redis,Sciumo/redis,spinlock/redis,xlzhan/redis,ituncle/redis,ctripcorp/redis,zhcy/redis,oranagra/redis,elkingtonmcb/redis,jingjidejuren/redis,pedigree/redis,GitHubMota/redis,weizijun/redis,harrisonfeng/redis,twskipper/redis,MasahikoSawada/redis,pcarrier/redis,jingjidejuren/redis,Aliceljm1/redis,mengyou0304/redis,davidradunz/redis,OmarQunsul/graph-redis,dreamquster/redis,antirez/redis,weizijun/redis,izhoujie/redis,tanghaodong25/redis,xlzhan/redis,4396/redis,tjschuck/redis,rouzier/redis,blackmady/redis,oranagra/redis,ipmobiletech/redis,itamarhaber/redis,YuraLukashik/redis,shining-yang/redis,itamarhaber/redis,izhoujie/redis,zguangyu/redis,riyan8250/redis,Soledad89/redis,tanghaodong25/redis,mengyou0304/redis,jackyan/redis,StevenTsai/redis,zczhuohuo/redis,mcanthony/redis,charsyam/redis,rouzier/redis,StevenTsai/redis,ipmobiletech/redis,neomantra/redis,JoeWoo/redis,devaos/redis,duanx/redis,zhiliaoniu/redis,riyan8250/redis,elkingtonmcb/redis,ituncle/redis,linfangrong/redis,charsyam/redis,ErikDubbelboer/redis,xlzhan/redis,twskipper/redis,mverrilli/redis,arijitvt/redis,JoeWoo/redis,zhiliaoniu/redis,jackyan/redis,SyntaxStacks/redis,riyan8250/redis,weizijun/redis,rogerchina/redis,badboy/redis,zguangyu/redis,pmem/redis,h0x91b/redis,soveran/redis,rogerchina/redis,itamarhaber/redis,davidradunz/redis,Soledad89/redis,pmem/redis,YuraLukashik/redis,PradheepShrinivasan/redis,ErikDubbelboer/redis,spinlock/redis,YongMan/redis,clamoriniere1A/redis,jackyan/redis,aim-for-better/redis,PradheepShrinivasan/redis,spinlock/redis,oranagra/redis,blackmady/redis,soveran/redis,csuhawk/redis,zczhuohuo/redis,programmecat/redis,zguangyu/redis,Markgorden/redis,colstrom/redis,shreesundara/redis,pcarrier/redis,PKRoma/redis,neomantra/redis,neomantra/redis,Markgorden/redis,wangyikai/redis,izhoujie/redis,pmem/redis,colstrom/redis,colstrom/redis,tjschuck/redis,janekmi/redis,yuhc/redis-benchmark-enhanced,csuhawk/redis,sunheehnus/redis,yossigo/redis,ctripcorp/redis,YongMan/redis,AALEKH/redis,PKRoma/redis,taoguan/redis,sunheehnus/redis,sunheehnus/redis,AALEKH/redis,francischan714/redis,janekmi/redis,csuhawk/redis,antirez/redis,Markgorden/redis,hgl888/redis,h0x91b/redis,GitHubMota/redis,zhcy/redis,davidradunz/redis,soloestoy/redis,h0x91b/redis,zhcy/redis,Aliceljm1/redis,ton31337/redis,badboy/redis,twskipper/redis,JoeWoo/redis,PKRoma/redis,xuguruogu/redis,shining-yang/redis,ipmobiletech/redis,clamoriniere1A/redis,mengyou0304/redis,Soledad89/redis,riyan8250/redis,StevenTsai/redis,Soledad89/redis,soveran/redis,shining-yang/redis,dreamquster/redis,dreamquster/redis,kensou97/redis,hgl888/redis,jackyan/redis,wangyikai/redis,hgl888/redis,vincent-vivian-liu/redis,harrisonfeng/redis,PradheepShrinivasan/redis,ton31337/redis,blackmady/redis,a-pavlov/redis,a-pavlov/redis,nnog/redis,wangyikai/redis,kensou97/redis,190235047/redis,izhoujie/redis,nnog/redis,190235047/redis,nnog/redis,tjschuck/redis,taoguan/redis,hawkchch/redis,harrisonfeng/redis,h0x91b/redis,tanghaodong25/redis,YongMan/redis,blackmady/redis,weizijun/redis,clamoriniere1A/redis,qiyang0221/redis,hawkchch/redis,Sciumo/redis,Aliceljm1/redis,ton31337/redis,xuguruogu/redis,GitHubMota/redis,yuhc/redis-benchmark-enhanced,zczhuohuo/redis,harrisonfeng/redis,xujunhai1991/redis,badboy/redis,duanx/redis,SyntaxStacks/redis,davidradunz/redis,linfangrong/redis,ofirluzon/redis,ituncle/redis,mcanthony/redis,taoguan/redis,Sciumo/redis,vincent-vivian-liu/redis,devaos/redis,aim-for-better/redis,OmarQunsul/graph-redis,taoguan/redis,SyntaxStacks/redis,MasahikoSawada/redis,190235047/redis,190235047/redis,yuhc/redis-benchmark-enhanced,janekmi/redis,spinlock/redis,duanx/redis,charsyam/redis,rouzier/redis,shreesundara/redis,jingjidejuren/redis,yossigo/redis,jingjidejuren/redis,programmecat/redis,tanghaodong25/redis,hawkchch/redis,SyntaxStacks/redis,Aliceljm1/redis,soloestoy/redis,wangyikai/redis,Sciumo/redis,linfangrong/redis,programmecat/redis,ofirluzon/redis,ofirluzon/redis,Markgorden/redis,ofirluzon/redis,qiyang0221/redis,PKRoma/redis,rogerchina/redis,ofirluzon/redis,charsyam/redis,zhiliaoniu/redis,mcanthony/redis,hgl888/redis,duanx/redis,JoeWoo/redis,seandsky/redis,xujunhai1991/redis,AALEKH/redis,aim-for-better/redis,MasahikoSawada/redis,PradheepShrinivasan/redis,xuguruogu/redis,francischan714/redis,zhiliaoniu/redis,ctripcorp/redis,xlzhan/redis,soveran/redis,4396/redis,mengyou0304/redis,pcarrier/redis,seandsky/redis,xujunhai1991/redis,ipmobiletech/redis,nnog/redis,PKRoma/redis,vincent-vivian-liu/redis,yossigo/redis,mverrilli/redis,a-pavlov/redis,antirez/redis,devaos/redis,pcarrier/redis,yossigo/redis,4396/redis,elkingtonmcb/redis,arijitvt/redis,rouzier/redis,qiyang0221/redis,elkingtonmcb/redis,neomantra/redis,colstrom/redis,hawkchch/redis,GitHubMota/redis,MasahikoSawada/redis,ErikDubbelboer/redis,pedigree/redis,zguangyu/redis,shreesundara/redis,arijitvt/redis,vincent-vivian-liu/redis,zczhuohuo/redis,YuraLukashik/redis,shining-yang/redis,ton31337/redis,pmem/redis,soloestoy/redis,tjschuck/redis,qiyang0221/redis,rogerchina/redis,yuhc/redis-benchmark-enhanced,francischan714/redis,OmarQunsul/graph-redis,StevenTsai/redis,neomantra/redis,YuraLukashik/redis,kensou97/redis,mverrilli/redis,ErikDubbelboer/redis,devaos/redis,csuhawk/redis,arijitvt/redis,xuguruogu/redis,ctripcorp/redis,soloestoy/redis,programmecat/redis,oranagra/redis