CHICAGO -- Buster Posey was just as thrilled behind the plate as he was rounding the bases.
Cain and Zambrano each pitched six scoreless innings, but the Giants did just enough to prevail. Leading San Diego by a half-game and Colorado by 1 1/2 when the night began, San Francisco finally broke through with one out in the eighth when Posey drove a 3-1 pitch from Andrew Cashner (2-6) to center field, pumping his fist as he rounded the bases.
He now has 15 homers, the most by a Giants rookie since Chris Brown hit 16 in 1985. His 62 RBIs are the most by a San Francisco rookie since Chili Davis' 76 in 1982. Throw in a .324 average, and it's easy to see Posey winning NL Rookie of the Year.
"Catching a shutout is probably as big a thrill as anything," said Posey, who also threw out Starlin Castro trying to steal second in the first inning.
"You can't get better than that," manager Bruce Bochy said.
He could have just as easily been talking about the pitching.
In a game that was delayed for more than an hour by rain at the start, Cain and Zambrano sailed along before being lifted for pinch hitters.
Zambrano gave up just three and struck out eight, although he did walk five while throwing 116 pitches.
Both were backed by some solid defense, too, but in the end, the Giants snapped Chicago's six-game win streak.
"The Cubs pay me to win and the fans want me to win and I only have nine wins," said Zambrano, who's 6-0 in his last nine starts in a strong finish to a year in which the former ace bounced between the rotation and bullpen and get suspended for a dugout blowup. "For me it's a disappointing season, but the most important thing is I have my confidence back and I will be back next year with the same attitude and with the same passion for the game and ready to do some damage."
Ramon Ramirez (1-3) worked a perfect seventh for San Francisco, and Sergio Romo retired the side in the eighth. Brian Wilson pitched a perfect ninth for his major league-leading 44th save in 48 chances, leaving him four shy of Rod Beck's single-season club record.
The game was the Cubs' first since part of a broken bat punctured Tyler Colvin's chest, and there were several scares in this one.
There was a loud groan in the third when San Francisco's Cody Ross lost his bat as he struck out swinging. It went flying down the third-base line and landed near umpire Brian Runge, who saw it coming and didn't have to move.
On the game's final pitch, fans behind the third-base dugout scattered when part of Marlon Byrd's sawed-off bat went flying into the stands on a groundout to third.
Colvin remains in stable condition in a Miami hospital after a scary injury in Sunday's 13-3 win over the Marlins, when he was struck by a sliver of Welington Castillo's broken bat while on third. Castillo doubled on the play and Colvin scored.
That came at a time when the Cubs are winding down a miserable season with some of their best ball in recent memory. They're on their longest win streak since a seven-game run in Aug. 2008, and were coming off an 8-1 trip that ranks as the most successful of nine or more games in the franchise's history.
But the Giants started what could be a difficult road swing on a good note, with a weekend series against a Rockies team that has wiped out most of an 11-game deficit up next.
"This is exciting," Cain said. "We're all having a lot of fun."
Giants CF Andres Torres, recovering from an appendectomy, has started taking light swings, and manager Bruce Bochy hopes to have him back for the weekend series at Colorado. ... The Cubs placed Colvin and C Geovany Soto, who had right shoulder surgery Monday, on the 15-day disabled list. They also activated P Esmailin Caridad from the 60-day disabled list and optioned him to Double-A and designated P Mitch Atkins for assignment.