[Asterisk-Users] 'System' application exit with error even ifit performs the job as expected

Dan dtoma at fx.ro
Fri Aug 1 01:40:22 MST 2003


Hi,

This is the result:

[root at danpbx temp]# ./mysystem
system("/bin/ls > /dev/null") returned 0
[root at danpbx temp]#

BR,
Dan

----- Original Message ----- 
From: "Armand A. Verstappen" <armand at nl.envida.net>
To: <asterisk-users at lists.digium.com>
Sent: Friday, August 01, 2003 10:41 AM
Subject: Re: [Asterisk-Users] 'System' application exit with error even ifit
performs the job as expected

If you create mysystem.c containing:

#include <stdlib.h>
#include <stdio.h>

int main() {

        int ret;

        ret = system("/bin/ls > /dev/null");

        printf("system(\"/bin/ls > /dev/null\") returned %d\n", ret);

        return(ret);
}

and compile it with:

gcc mysystem.c -o mysystem

and run:

./mysystem

what is the output?

wkr,

-- 
Envida                     http://www.envida.net/
Armand A. Verstappen       Graadt van Roggenweg 328
armand at nl.envida.net       3531 AH Utrecht
tel: +31 (0)30 298 2255    Postbus 19127
fax: +31 (0)30 298 2111    3501 DC Utrecht





More information about the asterisk-users mailing list