print_usage() equivalent?

bridged with qnx.rtos
Post Reply
Kevin Miller

print_usage() equivalent?

Post by Kevin Miller » Tue May 01, 2007 10:22 pm

Is there a Neutrino equivalent for print_usage()?

Ryan J. Allen

Re: print_usage() equivalent?

Post by Ryan J. Allen » Wed May 02, 2007 8:04 pm

On 01/05/2007 6:22 PM, Kevin Miller wrote:
Is there a Neutrino equivalent for print_usage()?
I don't believe so, but this should do it:

#include <process.h>
int print_usage(char **argv) {
return execlp("use",argv[0],argv[0],NULL);
}

--
Ryan J. Allen
QNX Software Systems

Colin Burgess

Re: print_usage() equivalent?

Post by Colin Burgess » Wed May 02, 2007 8:15 pm

Better get the fullpath of argv[0] before you do any chdir()s though...

Ryan J. Allen wrote:
On 01/05/2007 6:22 PM, Kevin Miller wrote:
Is there a Neutrino equivalent for print_usage()?

I don't believe so, but this should do it:

#include <process.h
int print_usage(char **argv) {
return execlp("use",argv[0],argv[0],NULL);
}
--
cburgess@qnx.com

Post Reply

Return to “qnx.rtos”