RE: test d'échec sur une commande system
paul.poulain@free.fr
paul.poulain@free.fr
Thu, 21 Jun 2001 17:11:57 +0200
At 16:52 21/06/01 +0200, Arnaud Calvo wrote:
A mon avis, tu t'es trompé de liste...
According to me, you wrote to a wrong list...
--
Paul, from France, who understood, but it has nothing to do with gnucash ;-)
>On 21-Jun-2001 Sniper \(at work\) wrote:
>
> > You can check all the failure possibilities by inspecting
> > `$?' like this:
> > $exit_value = $? >> 8;
> > $signal_num = $? & 127;
> > $dumped_core = $? & 128;
>
>Voilà comment j'ai compris le truc :
>
>RESTART_PPPD;
>system("/usr/sbin/pppd call script logfile /var/log/pppd.log");
>$exit_value = $? >> 8;
>if ($exit_value != 0) { goto RESTART_PPPD }
>
>Le pb, c'est que $exit_value est initiée avec "0" avant même que
>la commande pppd ait "accroché" la porteuse... comme lorsqu'on
>lance sous bash une commande en arrière plan.
>
>--
>http://www.calvo-france.com/linuxtips.php (10/06/01)
>________________________________________________
> A r n a u d C a l v o 47°43'60N 0°31'0W
>_______________________________________________
>gnucash-devel mailing list
>gnucash-devel@lists.gnumatic.com
>http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel