Usenet comp.sys.vms (1990-2004)
 help / color / mirror / Atom feed
* DEC C popen fn
@ 1998-02-16  5:00 Harminder Banwait
  1998-02-17  5:00 ` Kaz Kylheku
  1998-02-17  5:00 ` Stephan Wilms
  0 siblings, 2 replies; 3+ messages in thread
From: Harminder Banwait @ 1998-02-16  5:00 UTC (permalink / raw)



Hi,

I'm trying to make use of the popen function that is now implemented in the
latest version of OpenVMS, but having no joy - it always returns a NULL
pointer as the file pointer. (errno stays at 0). Any suggestions as to why
this might be (permission problem ??)

eg :

FILE *file_ptr;

file_ptr = popen("dir *.c", "r");


I'm doing this as I want to read a directory on the machine into an array of
filenames.  If someone can suggest another (better ?) way of doing this then
I'd be very gratefully

Any replies CC directly if possible - Thanks


Richard






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DEC C popen fn
  1998-02-16  5:00 DEC C popen fn Harminder Banwait
@ 1998-02-17  5:00 ` Kaz Kylheku
  1998-02-17  5:00 ` Stephan Wilms
  1 sibling, 0 replies; 3+ messages in thread
From: Kaz Kylheku @ 1998-02-17  5:00 UTC (permalink / raw)



In article <6c9pqs$pun@romeo.logica.co.uk>,
Harminder Banwait <banwaith@logica.com> wrote:
>Hi,
>
>I'm trying to make use of the popen function that is now implemented in the
>latest version of OpenVMS, but having no joy - it always returns a NULL
>pointer as the file pointer. (errno stays at 0). Any suggestions as to why
>this might be (permission problem ??)

There is no such function in standard C. It's a UNIX/POSIX function.  My man
page for it says that it may return NULL; it could be that the implementors
simply chose to have it return NULL each time it is called, allowing programs
which use popen to compile but not actually invoke the functionality. Given
that, as you say, the function wasn't supported at all in a previous version
of the system, this wouldn't be surprising.

I think you are lost in search for an OpenVMS programming newsgroup.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DEC C popen fn
  1998-02-16  5:00 DEC C popen fn Harminder Banwait
  1998-02-17  5:00 ` Kaz Kylheku
@ 1998-02-17  5:00 ` Stephan Wilms
  1 sibling, 0 replies; 3+ messages in thread
From: Stephan Wilms @ 1998-02-17  5:00 UTC (permalink / raw)



Harminder Banwait wrote:
> 
> Hi,
> 
> I'm trying to make use of the popen function that is now implemented in the
> latest version of OpenVMS, but having no joy - it always returns a NULL
> pointer as the file pointer. (errno stays at 0).

Hi Harminder Banwait,

Sorry, but there is no "popen()" function in standard C. You must be
talking about a compiler or OS specific language extension. I have
the strong suspicion, that this is a typical Unix function, therefore
the Unix programming experts will surely be able to help you:
  news:comp.unix.programmer

Stephan
(initiator of the campaign against grumpiness in c.l.c)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-02-17  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-02-16  5:00 DEC C popen fn Harminder Banwait
1998-02-17  5:00 ` Kaz Kylheku
1998-02-17  5:00 ` Stephan Wilms

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox