Re: Issue related to system() call and file handles.



gmtonyhoyt@xxxxxxxxx writes:
> Okay, this one's a tough one for me to explain so this might take a few
> e-mails to get the idea across. Here's what I got though.
>
> I have this application running on a Sun/Solaris machine, written in
> C, using the Sun Forte Developer 7 C 5.4 Compiler released a few years
> ago. Not exactly old but, you get the picture.
>
> Now, most if not all the file handles on this machine are most likely
> being used up by a secondary process and/or application. I can't help
> it, they are just gone. So for file manipuation I've been using open,
> write, etc. The older file handle functions. No big deal, it works
> fine.

The open() and write() functions are non-standard (well, they're
POSIX, but the C standard doesn't mention them). To go slightly
off-topic, the standard C fopen() and fwrite() functions are often
implemented on top of the lower level open() and write() functions.
I'd be surprised if using the lower-level functions solved the problem
you're describing. But it's almost certainly a question for
comp.unix.solaris.

[snip]

> So, why is it, when I call this script using system("./myScript"); it
> fails, but when I manually run ./myScript it runs fine?

I doubt that we're going to be able to help you here, since it doesn't
sound like the problems you're having are related to anything defined
in the C language. Either comp.unix.solaris or comp.unix.programmer
is more likely to be able to help you.

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.



Relevant Pages

  • Hoping for a good show.
    ... It does no good to argue which standard is " better "... ... and I never have any problems with spam or viruses. ... (From another Linux zealot, no doubt, aiming at Outlook) ... For composing e-mails and such, ...
    (sci.physics)
  • Hoping for a good show.
    ... It does no good to argue which standard is " better "... ... and I never have any problems with spam or viruses. ... (From another Linux zealot, no doubt, aiming at Outlook) ... For composing e-mails and such, ...
    (comp.os.linux.development.apps)
  • Re: Efficency and the standard library
    ... "C exists in multiple incompatible versions because the Standard ... When the going gets tough the tough get going: ... Of high and fearless rank do fear to tread. ...
    (comp.lang.c)
  • Re: Warum =?ISO-8859-1?Q?verschl=FCsseln=3F?=
    ... Signaturen als Standard durchgesetzt haben. ... unsignierte E-Mails nicht zu befördern ist dann eben selbst schuld. ... Du scheinst es immer noch nicht zu verstehen: der Arbeitgeber hat ... der Absender ein deutlich geringeres Interesse am Ankommen ...
    (de.comp.security.misc)
  • GAL - excluding OU
    ... I have standard AD & Exchange 2003 setup with GAL that includes all ... e-mails in AD. ...
    (microsoft.public.exchange.admin)