Seg fault sur commande fake

Salut à tous,

Pour les besoins d’un TP, je dois remplacer ma commande ps pour celle-ci: xfocus.net/tools/200002/ps.c
Je compile donc le ps.c et je remplace la commande /bin/ps par le fake ps.
Le problème c’est quand je lance ma nouvelle commande ps: Segmentation fault.
D’après ce que j’ai vu ça a l’air d’être un pb d’accès mémoire, mais je ne sais pas le corriger :12

Quelqu’un aurait-il la solution à ce problème ?

Taker16

If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm.

En d’autres termes : pose une question précise. Merci. (c’est pour ton propre bien hein, je voudrais surtout pas avoir à te bodily harm si on peut l’éviter :wink:).

Je vois pas trop ce que je pourrais ajouter de plus …
à la limite: Quelqu’un sait t’il by-passer cette “protection” pour que ma fake commande ps puise s’exécuter correctement ?

Merci.

The Short Message Service me les a toujours gonflé!