Re: problem with "<" in linux
- From: William Pursell <bill.pursell@xxxxxxxxx>
- Date: Mon, 09 Jul 2007 17:20:27 -0700
On 9 Jul, 21:05, j...@xxxxxxxxxxx (Jens Thoms Toerring) wrote:
Jens Thoms Toerring <j...@xxxxxxxxxxx> wrote:
That's probably the simplest alternative, but then make it
execv( "/bin/sh", "/bin/sh", "-c", "program", "<", "file1" );
Grrr. Now I also forgot '(char *) NULL' as the last argument.
And, of course, it must be the execl() function, execv() would
require an array of arguments instead of a list of arguments.
So make it
execl( "/bin/sh", "/bin/sh", "-c", "program", "<",
"file1", ( char * ) NULL );
Shouldn't that be:
execl( "/bin/sh", "/bin/sh", "-c", "program < file1", NULL );
.
- Follow-Ups:
- Re: problem with "<" in linux
- From: Måns Rullgård
- Re: problem with "<" in linux
- References:
- problem with "<" in linux
- From: davide . giuralarocca
- Re: problem with "<" in linux
- From: Jens Thoms Toerring
- Re: problem with "<" in linux
- From: Scott Lurndal
- Re: problem with "<" in linux
- From: Jens Thoms Toerring
- Re: problem with "<" in linux
- From: Jens Thoms Toerring
- problem with "<" in linux
- Prev by Date: Re: Signal handling in multi-threaded applications.
- Next by Date: Re: problem with "<" in linux
- Previous by thread: Re: problem with "<" in linux
- Next by thread: Re: problem with "<" in linux
- Index(es):
Relevant Pages
|