Hi Hector,
The system function has *NOTHING* to do with lesstif.
The system function is a part of your system libraries.
For this kind of problem please refer to more appropriate
mailing lists/newsgroups.
Also please do some basic research before you contact anyone
else ( e.g. run the command "man system" or check any unix/linux
programming books which you may have ).
Looking forward to hearing about your lesstif experiences,
CP
hector duque wrote:
>
> yes, Matthias, that program runs very well!
>
> the problem comes when lesstif is present. I know it looks like an specific program
>bug,
> but I have tryied adding a "system" command into some examples programs which I have
> down loaded from the WEB. The msg is the same:
>
> sh: -c requires an argument
>
> What the "system" commnad does is to run a "sh -c " command with an argument: the
> embebbed command into the "system" command. The msg looks like a wrong command of
>the
> kind:
> system();
>
> I'am running linux red hat 5.1, lesstif motif 1.20 and c gnu.
>
> well, could be any thing .... maybe a compilation option ? I don know ...
>
> I'll appreciate your comments!
>
> regards, hector
>
>
> Matthias Buelow wrote:
>
> > hector duque <[EMAIL PROTECTED]> wrote:
> >
> > >I am getting some problems using the "system" command from a lesstif
> > >program. I mean, when I use a command like:
> > > system("ls"), or
> > > system (cmd)
> > >
> > >I have got a msg:
> > >
> > > sh: -c requieres an argument
> >
> > LessTif doesn't redefine system() (at least it doesn't appear by
> > doing a "nm" on the library file and I wouldn't see a reason why
> > it should) so if at all this is a problem with your standard C
> > runtime library... However I also can't imagine that in a stable
> > version of your operating system (or library / compiler suite etc.)
> > such an obvious bug could slip in; I'm quite sure it is a bug in
> > your program.
> >
> > Does the following short program also fail in your environment?
> >
> > ---------------------------
> > #include <stdlib.h>
> >
> > int main()
> > {
> > system("ls");
> > return 0;
> > }
> > ---------------------------
> >
> > --
> > Matthias Buelow <[EMAIL PROTECTED]>