• [^] # Re: 13 % de « code mort »

    Posté par . En réponse à la dépêche 985 bugs dans le noyau Linux. Évalué à 5.

    Depuis quand une page sortie au hasard d'internet permet de dire que c'est un bug ?

    Chez moi POSIX dit ca :

    =======
    Early proposals required that the value of argc passed to main() be "one or greater". This was driven by the same requirement in drafts of the ISO C standard. In fact, historical implementations have passed a value of zero when no arguments are supplied to the caller of the exec functions. This requirement was removed from the ISO C standard and subsequently removed from this volume of IEEE Std 1003.1-2001 as well. The wording, in particular the use of the word should, requires a Strictly Conforming POSIX Application to pass at least one argument to the exec function, thus guaranteeing that argc be one or greater when invoked by such an application. In fact, this is good practice, since many existing applications reference argv[0] without first checking the value of argc.
    =========

    On notera le should !

    Pour la norme C je te laisse chercher tout seul les outils pour lire du ps dans gnome sont tellement pratique qu'en 2004 y'a toujours pas la fonction "recherche"