bonjour � toutes et � tous  ;-)

On Sat, Dec 08, 2001 at 05:42:36AM +0100, [EMAIL PROTECTED] wrote:
> J'ai programme C qui me renvoi un code retour 139 pendant ses traitements, 
> hors 
> je ne sais pas � quoi correspondt ce code retour, si quelqu'un peut me donner 
> la marche � suivre ou connait deja la raison, merci de m'aider.

$ man return
BASH_BUILTINS(1)                                 BASH_BUILTINS(1)
[...]
       return [n]
              Causes a function to exit  with  the  return  value
              specified by n.  If n is omitted, the return status
              is that of the last command executed in  the  func�
              tion  body.  If used outside a function, but during
              execution of a script by the .   (source)  command,
              it  causes  the shell to stop executing that script
              and return either n or the exit status of the  last
              command executed within the script as the exit sta�
              tus of the script.  If used outside a function  and
              not  during  execution of a script by ., the return
              status is false.

  ok, c'est pour le shell ; mais... c'est valable en g�n�ral.

La �convention� voudrait qu'un programme retourne 'faux' en cas
d'erreur. Tout d�pend maintenant de comment est cod� 'faux' : il
y a souvent beaucoup de raisons possibles qui peuvent provoquer
une erreur et en g�n�ral, on retourne des messages d'erreur (en texte)
compr�hensibles en lieu et place des codes.
Donc, il te reste � regarder dans la doc du prog ce qui est dit
au sujet des codes d'erreur ; et sinon,
� chercher directement dans le code C  :-)

> PS:Prochain projet, je choisirai debian :-)

  c'est un probl�me de bonne programmation/documentation,
pas de syst�me d'exploitation !

    bon we  :-))
-- 
Philippe BOURCIER  http://bourcier.philippe.online.fr

Répondre à