This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: arguments to main


Tracy Jones wrote:
> available.  I understand that the synthetic target does not make an
> attempt to
> preserve command line args, but is there a way to "hack" it in there?

You can get them by reading the file /proc/self/cmdline (using Linux
system calls, i.e. cyg_hal_sys_open/read/close()). I've done that before
and it works, but it would be extremely nice if the synthetic eCos would
provide an official way to get them. The same holds for the environment
variables - they're available in /proc/self/environ but it would be much
easier if there were something like cyg_hal_get_environ()...

Martin

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]