nntp2http.com
Posting
Suche
Optionen
Hilfe & Kontakt

Re: exec() e stdout ...

Von: Giovanni (lsodgf0@home.net.it) [Profil]
Datum: 05.05.2008 17:34
Message-ID: <fvn9du$rct$1@milena.home.net.it>
Newsgroup: it.comp.os.linux.development
On 05/05/08 17:10, Alexandros wrote:
> RedWiz ha scritto:
>> no, man popen
>
> e... ma non *devo* usare le pipe ...
>

puoi usare la freopen().

Per esempio:
if ((pid = fork()) == 0) {
/* Child */
freopen("mio_file.txt", "w", stderr);
execl("/bin/ls", "ls", "-l", NULL);
} else .......

Ciao
Giovanni
--
A computer is like an air conditioner,
it stops working when you open Windows.
Registered Linux user #337974  < http://giovanni.homelinux.net/ >

[ Auf dieses Posting antworten ]

Antworten