C Unix calling system() from multithreaded process

T

talisman

hi,

one of my friends was saying it's not a good idea to do this.

certainly on my Solaris box man system makes a similar statement.

could anyone elaborate in practicality how risky this is?

i'm currently calling the system() function from within my 64 bit c
app..

i've had to do this because my program has to work with code for which
there are only 32bit libraries - hence my system() call to the
external 32 bit command.

is there a better way of doing this?
 
J

Jack Klein

hi,

one of my friends was saying it's not a good idea to do this.

To do what? Some newsreaders do not display the subject line when
displaying the message bodies. Always include your topic in the body
as well.

In any case, the C language does not support threads or processes, so
there is no language issue involved here.
certainly on my Solaris box man system makes a similar statement.

If your compiler documentation suggests that you should not do this,
then you probably shouldn't. If you want to know why, contact Sun
technical support or ask in a Solaris programming group. I seem to
remember that there is one.
could anyone elaborate in practicality how risky this is?

Not anyone here, no, it is off-topic.
i'm currently calling the system() function from within my 64 bit c
app..

i've had to do this because my program has to work with code for which
there are only 32bit libraries - hence my system() call to the
external 32 bit command.

There is no such thing as "64 bit C" or "32 bit libraries" in the C
language. These are implementation details of your compiler and
platform, not anything to do with the language.
is there a better way of doing this?

Yes, consulting the sources I suggested above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top