Главная страница


ru.perl

 
 - RU.PERL ----------------------------------------------------------------------
 From : Vladimir Podgorny                    2:5020/400     25 Apr 2002  21:53:59
 To : Dmitry Suhodoev
 Subject : Re: как узнать код возврата запущенной программы
 -------------------------------------------------------------------------------- 
 
 Dmitry Suhodoev <Dmitry.Suhodoev@f428.n550.z2.fidonet.org> wrote:
 
 > have a nice death, Hаpод _*/;/*_)
 > 
 > сабж, то, что в шелле достигается с помощью "cmd && echo result funny"?
 
 Так же как и в шелле - $?.
 
 perldoc perlvar
 
        $CHILD_ERROR
        $?      The status returned by the last pipe close, back-
                tick ("``") command, successful call to wait() or
                waitpid(), or from the system() operator.  This is
                                       ^^^^^^^^
                just the 16-bit status word returned by the wait()
                system call (or else is made up to look like it).
                Thus, the exit value of the subprocess is really
                ("$? >> 8"), and "$? & 127" gives which signal, if
                any, the process died from, and "$? & 128" reports
                whether there was a core dump.  (Mnemonic: similar
                                                ^^^^^^^^^^^^^^^^^^
                to sh and ksh.)
                ^^^^^^^^^^^^^^^
 ...
 
 > --
 > raVen, raven#fido,urc,ac,ru, http://raven.elk.ru/
 
 -- 
 VP992-RIPE
 --- ifmail v.2.15dev5
  * Origin: Adamant ISP news server (2:5020/400)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 как узнать код возврата запущенной программы   Dmitry Suhodoev   25 Apr 2002 22:54:22 
 Re: как узнать код возврата запущенной программы   Vladimir Podgorny   25 Apr 2002 21:53:59 
Архивное /ru.perl/12034323ad9f2.html, оценка 1 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional