[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-list
Subject:    Re: [LTP] [PATCH] [syscalls] getrusage03: test ru_maxrss
From:       Caspar Zhang <czhang () redhat ! com>
Date:       2011-05-20 16:12:02
Message-ID: 4DD692D2.4030407 () redhat ! com
[Download RAW message or body]

On 05/20/2011 09:29 PM, Cyril Hrubis wrote:
> Hi!
>>     [Un]fortunately we don't (I say that because writing something
>> functional would be kind of a pain because we'd need to replicate what
>> tar does with that file mode, permissions bits, and other fun security
>> attributes in order to be complete).
>>     Does this need to be run from the current working directory, or
>> can it be picked up from $PATH ? If the latter is ok, then all you
>> need to do is add $LTPROOT/testcases/bin to $PATH (which should be
>> done already by runltp) and use execvp, or you could play tricks and
>> lookup the dirname of the realpath, etc of the testcase (argv[0]), and
>> use that in the execle, etc call.
> 
> All the child does here is allocating memory, so I would say execvp() is
> good enough in this case. (And adding note about this into style-guide
> would be great).
> 
Thanks Cyril and Garrett, I think execvp can meet my needs, I'll try it
and update the patch later on.

Caspar

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic