E
Eric Jacoboni
Hi,
In C, if i redirect, say stderr, to a file before doing an
exec(). The exec inheriting of the file descriptors, the command
exec'ed will produce its error messages in the file i've chosen.
I've tried to mimic this with Ruby using this snippet:
$stderr = File.open("erreur", File::WRONLY|File::CREAT, 0644)
exec("gcc -c bla.c")
but it seems that exec doesn't care of my redirection.
What i've missed?
In C, if i redirect, say stderr, to a file before doing an
exec(). The exec inheriting of the file descriptors, the command
exec'ed will produce its error messages in the file i've chosen.
I've tried to mimic this with Ruby using this snippet:
$stderr = File.open("erreur", File::WRONLY|File::CREAT, 0644)
exec("gcc -c bla.c")
but it seems that exec doesn't care of my redirection.
What i've missed?