Cook the pasta in a plenty of boiling salted water according to the instruction on the packet. Heat the oil in a frying pan and fry the onions and bacon or pancetta for 10 minutes, until softened. Stir in the garlic and fry for a further 2 minutes, stirring occasionally. Meanwhile, beat the eggs in a bowl, then stir in the cream and seasoning. Grate the parmesan cheese and stir into the eggs and cream mixture. Stir in the cream mixture into the onion and bacon or pancetta and cook over a low heat for a few minutes, stirring constantly, until heated through. Season to taste. Drain the pasta thoroughly and turn into a large serving dish. Pour over the sauce and toss to coat. Serve immediately, garnish with chopped fresh basil.